3 Replies Latest reply on Aug 14, 2008 9:58 AM by Peter Brewer

    renderRegionOnly and DataScrollerPhaseListener incompatibili

    Peter Brewer Novice

      I have the following setup in my code:

      E.g.

      ...
       <a4j:outputPanel ajaxRendered="true">
       <ui:fragment rendered="#{entityList.expensiveCall}">
       <rich:dataTable ...>
       ...
       </richdataTable>
       </ui:fragment>
       </a4j:outputPanel>
      ...
       <a4j:region renderRegionOnly="true">
       <a4j:jsFunction name="showDialog" reRender="dialogOutputPanel" action="#{dialogs.displayDialog}" limitToList="true" />
       <a4j:outputPanel id="dialogOutputPanel">
       <a4j:modalPanel showWhenRendered="true" rendered="#{dialogs.visible}">
       ...
       </a4j:modalPanel>
       <a4j:outputPanel>
       </a4j:region>
      ...
      


      In 3.1.4.GA, this code behaved as expected, only traversing the component tree inside the region. But in 3.2.x,
      when a call to showDialog is made, the org.richfaces.component.DataScrollerViewPhaseListener always traverses the entire component tree, making calls to isRendered() while looking for rich:datascroller components - this can cause an expensive (database) function to be called (e.g. {entityList.expensiveCall}).

      Is there any way to disable this DataScrollerViewPhaseListener or a way to make it adhere to the renderRegionOnly logic? Or any other hints of suggestions to solve this would be greatly appreciated.

      Thanks in advance,
      Peter.