0 Replies Latest reply on Dec 21, 2009 7:49 PM by Dima Pykhanovsky

    a:include dynamic viewId problem

    Dima Pykhanovsky Newbie

      I'm running Seam 2.2.0.GA on JBoss 5.1.0.GA.
      I have one panel with behavior of menu with links, and another panel for displaying content appropriate to the link. Content needed to be reloaded dynamically without reloading whole page. I wrote such code:


      <rich:panel header="Operations">
                <h:panelGrid columns="3">
                     <a:commandLink id="viewActiveSession" action="#{action.setView('viewActiveSession.xhtml')}" 
                          value="1" reRender="customerAction"/>
                     <a:commandLink id="viewArchiveSessions" action="#{action.setView('viewArchiveSessions.xhtml')}" 
                          value="2" reRender="customerAction"/>
                     <a:commandLink id="changePassword" action="#{action.setView('changePassword.xhtml')}" 
                          value="3" reRender="customerAction"/>
                     <a:commandLink id="addMoney" action="#{action.setView('addMoney.xhtml')}" 
                          value="4" reRender="customerAction"/>
      <a:outputPanel id="customerAction">
           <a:include  viewId="#{action.view}"/>

      In java that's simple getter and setter.

      But this code have strange bahaviour. I should click a link twice and then panel rerenders. Or I can click link 1, then click link 2 and content appropriate to link 1 renders. It's like rerendering done before action called. What should I do to rerender just after action called?