ajax
  1. ajax
  2. AJAX-58

Support for JSF Action Listeners

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      58

      Description

      It would be nice to have a jMaki component to have an action and actionListener on it.

        Activity

        Hide
        gmurray71 added a comment -

        Switched to enhancement.

        Show
        gmurray71 added a comment - Switched to enhancement.
        Hide
        ntruchsess added a comment -

        pretty straightforeward to implement, as long we do it the same way as
        UICommandLink and UICommandButton do: Trigger the actionListener if there's a
        parameter whiches name corresponds to the client-id of a form-component
        surrounding the jmaki-component that contains the client-id of the
        jmaki-component as value.

        The more interesting question is: what js-code do we render? Since our widgets
        are meant to work platform-independent, we cannot rely on the same kind of
        server-side semantics. This looks like something that will really rock if we use
        a single client-side controller-extension to communicate with the server so
        widgets would just publish an event to a topic that results in the call of a
        serverside actionListener

        Show
        ntruchsess added a comment - pretty straightforeward to implement, as long we do it the same way as UICommandLink and UICommandButton do: Trigger the actionListener if there's a parameter whiches name corresponds to the client-id of a form-component surrounding the jmaki-component that contains the client-id of the jmaki-component as value. The more interesting question is: what js-code do we render? Since our widgets are meant to work platform-independent, we cannot rely on the same kind of server-side semantics. This looks like something that will really rock if we use a single client-side controller-extension to communicate with the server so widgets would just publish an event to a topic that results in the call of a serverside actionListener
        Hide
        ntruchsess added a comment -

        I've added support for 'action' and 'actionListner' to UIWidget and WidgetRenderer

        WidgetRenderer queues an ActionEvent on UIWidget whenever it finds a
        request-parameter named as the clientId of the nearest enclosing UIForm that
        contains the clientId of this UIWidget (this is how it's specified in the spec
        for UICommand).

        Queueing an ActionEvent by using dynafaces should also work.

        Javascript to generate this request-parameter is not rendered. This wouldn't be
        part of the renderer, this should be done in an event-handler in glue.js.

        Show
        ntruchsess added a comment - I've added support for 'action' and 'actionListner' to UIWidget and WidgetRenderer WidgetRenderer queues an ActionEvent on UIWidget whenever it finds a request-parameter named as the clientId of the nearest enclosing UIForm that contains the clientId of this UIWidget (this is how it's specified in the spec for UICommand). Queueing an ActionEvent by using dynafaces should also work. Javascript to generate this request-parameter is not rendered. This wouldn't be part of the renderer, this should be done in an event-handler in glue.js.

          People

          • Assignee:
            ajax-issues
            Reporter:
            Ed Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: