1 Reply Latest reply on Dec 21, 2007 1:20 PM by pauliov2

    Navigation inside ModalPanel - HELP!

    pauliov2

      Hi all,

      I have the similar usecase as "rolmovel" (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=126418). I need to display details of selected data item in ModalPanel, but additionaly I need to navigate in my list (Wizard-like, next - prev) from inside the ModalPanel . The ModalPanel itself is always rendered in main template like this:

      <rich:modalPanel id="mpFoto">
       <f:facet name="header"><h:outputText value="Foto details"/></f:facet>
       <f:facet name="controls">...</f:facet>
      
       <a4j:form>
       <!-- item data -->
       <h:panelGroup id="pnlFoto">
       <a4j:include viewId="viewFoto.xhtml" />
       </h:panelGroup>
      
       <!-- navi link -->
       <a4j:commandLink actionListener="#{mybean.actiateNextListener}"
       ajaxSingle="true"
       value="-Next-"
       reRender="pnlFoto"/>
       </a4j:form>
      </rich:modalPanel>
      

      The link to show ModalPanel looks like this:
      <a4j:commandLink
       actionListener="#{mybean.activateItemListener}"
       ajaxSingle="true"
       reRender="pnlFoto"
       oncomplete="Richfaces.showModalPanel('mpFoto',{left:250, top:30, height:720, width:660});">...</a4j:commandLink>
      

      The activateItemListener (on show) makes the data item available in my backing bean's property and then calls Richfaces.showModalPanel() on request complete.
      The actiateNextListener (navigation in ModalPanel) performs the navigation. All I need here is to get <h:panelGroup id="pnlFoto"> rerendered on AJAX request, but this seems to fail due to some reason. Another strange behaviour is, that after the ModalPanel is shown, the complete JS statement Richfaces.showModalPanel('mpFoto',{left:250, top:30, height:720, width:660}); becomes visibly rendered between <h:panelGroup id="pnlFoto"> and <a4j:commandLink>. This is the only output part, which becomes then rerendered after clicking on "next" link inside the ModalPanel.
      The navigation in backing bean works correctly, there are also no validation errors etc. but content of ModalPanel stay not changed.

      I have no idea, what is wrong in this approach. Any help/suggestions are wellcome.
      Thx in advance,
      paul

        • 1. Re: Navigation inside ModalPanel - HELP!
          pauliov2

          Correction: there is NO issue with rerendering... sorry, there was some minor bugs in my code.

          But issue with rendering of complete JS statement Richfaces.showModalPanel('mpFoto',{left:250, top:30, height:720, width:660}); directly after rerendered component (id="pnlFoto" in my case) still remains. This happens once, after the ModalPanel is shown with JS in oncomplete attribute of a4j:commandLink.