3 Replies Latest reply on Jan 10, 2013 10:35 AM by Fabian Riako

    Re-rendering a component is executing the page load action.

    Fabian Riako Newbie

      Hi All,

       

      I recently migrated our application from Jboss4.2/Seam 2.0/Richfaces 3.3 to Jboss 7/Seam 2.3/Richfaces 4.2 after that I found that most of the ajax requests are taking more time to finish. I am trying to figure out why this is happening. I did some debugging and found the following scenario.

      I have a SelectOneMenu and a Text are in one page, value of Text area is mandatory based on the value of SelectOneMenu so I  re-render Text area on onchage event of SelectOneMenu.

       

       

      <td style="width: 25%">
      <a:region>
                      <s:decorate id="statusDecoration" template="/layout/edit.xhtml">
                  <ui:define name="label"> Status</ui:define>
      <h:selectOneMenu id="status" required="true" value="#{editManager.statusId}">
                                  <f:selectItems value="#{dBUtil.getStatuses())}" />
                                  <a:ajax event="change" render="commentsDecoration"/>
                            </h:selectOneMenu> 
                      </s:decorate>
            </a:region>
      </td>
      <td>
            <s:decorate id="commentsDecoration" template="/layout/edit.xhtml"      rendered="#{editManager.type=='Testing'}">
      <ui:define name="label"> Comments</ui:define>                
      
      <h:inputTextarea id="comments    required="#{(editManager.statusId==5 or editManager.statusId ==6) 
                      rows="2"
                      cols="50"
                      value="#{editManager.comments}"/>     
            </s:decorate>
      </td>
      

       

      The re-render take 3-8 second to finish. When I look at log I found that the action specified in page.xml (<action execute="#{editManager.wire}"/>) is executing before the re-render. I think the ajax request should not execute the wire method. Can somebody say why this is executing?

       

      Thanks