3 Replies Latest reply on Jul 10, 2009 10:06 AM by sam-user

    problem with reRender on jsFunction

    sam-user

      Hello,

      I have the following button


      <a:commandButton id="save"
       value="Save"
       action="#{myBean.findDup}"
       oncomplete="if(#{dup.size>0})
       {
       myFunction();
       }
       ">
      
       <a:jsFunction name="myFunction" action="#{bean.action()}"
       reRender="dupList" oncomplete="Richfaces.showModalPanel('dupList');"/>
      </a:commandButton>




      my duplicatesList is:


      <f:subview >
       <a:outputPanel id="dupPanel" layout="none">
      
       <rich:modalPanel id="dupList" >
       ...
       <ui:include src="DupList.xhtml" />
       </rich:modalPanel>
      
       </a:outputPanel>
      </f:subview>






      and my DupList.xhtml is



      <rich:panel >
      
      ...
       <rich:dataTable id="dup" var="_dup" value="#{dup}" >
       <h:column>
       <f:facet name="header">
       <h:outputText value=" Id"/>
       </f:facet>
       <h:outputText value="#{_dup.entId}"/><br/>
       </h:column>
       <h:column >
       <f:facet name="header">
       <h:outputText value="State"/>
       </f:facet>
       <h:outputText value="#{_dup.status}"/><br/>
       </h:column>
       </rich:dataTable>
       ...
      </rich:panel>






      My problem is that the reRender="dupList" on the jsFunction "myFunction" does not rerender the modalPanel and the table "dup" is not populated.

      Could someone please point me to what am I doing wrong?

      Thanks.