4 Replies Latest reply on Jan 17, 2008 2:14 PM by Christopher Rivera

    Modal Panel and ReRender

    Christopher Rivera Newbie

      Hi

      I have a jsf page in REQUEST SCOPE which has a datatable and hiddne modal panel ...

      if i click on an edit button now i want to open the modal panel and fill in the correct values from that row... i have set a currentRow object in my backing bean before opening the modal panel and then set a rerender on the modal panel to show the values.

      here a code snippet

      <rich:dataTable width="100%" id="homeEntries" value="#{adminHome}" var="item" rows="20" rowKeyVar="rowNum">

      ...

      <rich:column style="align: center">
      <f:facet name="header">
      <h:outputText value=""/>
      </f:facet>
      <a4j:commandLink id="modify" actionListener="#{adminHome.prepareModify}" value="modifyRow" onclick="Richfaces.showModalPanel('newHomeEntry',{top:200})" reRender="newHomeEntry">
      <a4j:actionparam name="rowNum" value="#{rowNum}"></a4j:actionparam>
      </a4j:commandLink>
      </rich:column>
      ...

      <rich:modalPanel id="newHomeEntry" zindex="2000" autosized="true" >
      ... bla bla bla ...
      </rich:modalPanel>

      </rich:dataTable>

      The problem is now that since its a request scope the modal panel hides again as soon as the rerender on it is called ...

      can anyone help ?

      sorry for my english :)