3 Replies Latest reply on Mar 11, 2010 3:04 PM by jbalunas

    a4j:outputPanel: need to separate into two components

    ilya_shaikovsky

      The component was designed initially to provide container for zones which should be updated via ajax. And it's main feature as the a4j core component -  to provide possibility of marking as "always updateable" with ajaxRendered.

       

      But one more cool feature of the component is layout attribute. The component rendered as span or div depending on the layout. And in difference with standard  h:anelGroup it's always renders these elements(panelGroup renders wrapper element only if style or class defined). So the users started to use the component just for layouts creation(to add placeholders for drag/drop supports, tooltips and so on).

       

      The problem:

      Now we want to solve https://jira.jboss.org/jira/browse/RF-3341 problem. Thanks to JSF 2 no we have special system events(risen when component created) which allows us to handle outputPanels(or based components like messages) usage in the table and mark that concrete table for looking for ajaxRendered content inside. That allows us to tell to the developers that tables still will be checked on updates needed inside but not always as it was for 3.3.x - but just if components which implements AjaxOutput present inside.

      ajaxRendered could also be defined with EL and even pointed to iteration var attribute. So we do not want to check the actual value of ajaxRendered but make decision on just if the AjaxOutput present in table or no.

       

      Proposal

      So we need the developers to stop usage of this ajax core component just for layouts. That's why proposed to add the same component to UI "rich" library which should be used when the developer's goal to add div or span with the component.

       

      This sounds reasonable for me to split the ajax handling functionality from layout creation functyionality though the components will looks very similar.

        • 1. Re: a4j:outputPanel: need to separate into two components
          alexsmirnov
          It makes sense to extend panel "layout" options to HTML5 "semantic" elements - <header>, <footer>, <nav> and other.
          • 2. Re: a4j:outputPanel: need to separate into two components
            nbelaevski
            • 3. Re: a4j:outputPanel: need to separate into two components
              jbalunas

              I like the idea of having a component around to support different layout options ( HTML 5 included ), especially if used by the developers for this.


              I don't really like the idea of having an "a4j:outputPanel" and a "rich:outputPanel".  Especially if the only difference is the layout support.


              Here is a little brainstorming.

               

              Instead of having two different panels, could we have just the "rich:outputPanel" that supports the layout options.  Then either create a new behavior, or add functionality to a4j:ajax behavior that can be used to make nearly anything "Always Updatable"?  This effectively attach a "renderAlways" behavior to other components. 

               

              So developers could do something like this:

               

              <rich:outputPanel layout="xxx" ….>
                   <a4j:ajax renderAlways="true"/>
                   ...
              </rich:outputPanel>
              

               

              Don't worry about the actual name of the behavior or attribute this is just for brainstorming.

               

              This new behavior/functionality could also be tied to a value expression to make it variable based on other criteria.