2 Replies Latest reply on Aug 11, 2011 2:28 AM by Chris Ericsson

    Forward request do not render components properly

    Chris Ericsson Newbie

      Hello, I've got a render problem when I doing a forward request to a page with Richfaces components. Some Richfaces competent (tab panel, collapsible table, etc) doesn't get properly rendered, or re-rendered when the user fires an forward request. It renders correctly when I redirect the request in my faces-config file (due to the complete request of the page). But when I remove the redirect option, only the standard JSF components get rendered properly. I use ajax in my menu:item when process the request.

       

      I have tried the a4j:region tag, set the render="content" in the menu:item. But problem remains with some of the rich compensates(specially rich:tabPanel, rich:collapsibleSubtable). On the other hand the rich:panel, rich:datatable and standard JSF will render correctly when doing a forward request on other pages.

       

      How can I make these RichFaces components render properly when I do a forward request ?

       

      Greetings Chris.

      PS. I use Richfaces 4.0-final, Glassfish 3.1.

       

      faces-config.xml

      ...
      <navigation-rule>
         
      <from-view-id>*</from-view-id>
         
      <navigation-case>
             
      <from-outcome>ListActivity</from-outcome>
              <to-view-id>/
      app_user/activity/List.xhtml</to-view-id>
          </
      navigation-case>
      </navigation-rule>
      ...

      menu.xhtml

      ...
      <rich:dropDownMenu mode="ajax" >
         
      <f:facet name="label">
             
      <h:panelGroup>
                 
      <h:outputText value="Activity" />
             
      </h:panelGroup>
         </
      f:facet>
        
      <rich:menuItem action="ListActivity" render="content" label="List Activities"/>
      ...

      List.xhtml

      <ui:define name="content">
             
      <rich:panel header="Activity List" styleClass="left_content">
                 
      <h:form id="activitylist_form">
                     
      <rich:tabPanel switchType="ajax" itemChangeListener="#{activityController.processItemChange}" activeItem="#{activityController.activeTabItemName}">
                     
      <rich:tab name="OrganisationActivities" header="Organisation Activities">
                                 
      <h:panelGroup>
                                     
      <h:outputText value="No activities registred" escape="false" rendered="#{activityController.activityDataModel.rowCount == 0}" />
                                     
      <f:event type="preRenderComponent" listener="#{activityController.retrieveOrganisationActivity(event)}" />
                                     
      <rich:dataTable id="activitylist" rows="10" value="#{activityController.activityDataModel}" var="item" rowClasses="jsfcrud_odd_row,jsfcrud_even_row"
                                                     
      rendered="#{activityController.activityDataModel.rowCount > 0}">
      ...

      Capture.PNG