Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Ajax/JavaScript
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_medium importance_large

      Show
      size_medium importance_large

      Description

      Specifying the components for execution and re-rendering is very limited. Identifying components outside of a naming container is restricted to absolute component id paths. This is not very flexible. In combination with composite components this leads to requiring knowledge about the tree structure outside of the composite component. This breaks encapsulation.

      This simple example is not possible at the moment:
      <h:panelGroup id="outside">
      Something
      </h:panelGroup>
      <h:form id="form">
      <h:commandLink id="inner" value="Ajax">
      <f:ajax render="outside" />
      </h:commandLink>
      </h:form>

      There should be a much more flexible solution.

      Furthermore the concept of solely defining the components that take part in a partial (AJAX) request (execute and render) by parameters submitted by the client is very limited.
      There should be an option to dynamically decide on the server which components take part in the partial request. At the moment the client is responsible to send these ids.

      AJAX requests for example could have a logical name. Components could receive an event or register a listener at the view root that can in turn decide whether the component has to participate in the request or not. This could ease the initially described limitation and allows loosely coupled ajaxified parts of the view.
      Maybe this is a usecase for server-side behaviors?

        Activity

        Hide
        Hanspeter Duennenberger added a comment -

        There are components that should be rendered on all AJAX requests - like e.g. the h:messages area showing all the messages. There must be a way to add id's of components to render during PartialViewContext processing (see also my related blog for this https://insights2jsf.wordpress.com/2010/10/17/wrapping-partialviewcontext-or-howto-automatically-add-clientids-to-render-on-ajax-requests/).

        Having said that - there might even be components to execute always. I actually created a tag <my:always render="..." execute="..." /> that can be placed on pages to specify areas on the page to render/execute always.

        Show
        Hanspeter Duennenberger added a comment - There are components that should be rendered on all AJAX requests - like e.g. the h:messages area showing all the messages. There must be a way to add id's of components to render during PartialViewContext processing (see also my related blog for this https://insights2jsf.wordpress.com/2010/10/17/wrapping-partialviewcontext-or-howto-automatically-add-clientids-to-render-on-ajax-requests/ ). Having said that - there might even be components to execute always. I actually created a tag <my:always render="..." execute="..." /> that can be placed on pages to specify areas on the page to render/execute always.
        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mathias Werlitz
          • Votes:
            5 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: