1 Reply Latest reply on Mar 9, 2007 3:08 PM by sergeysmirnov

    a4j:include doesn't work in rich:modalPanel

    mkuehle

      Hi,

      the goal is to provide a registration wizzard with ajax4jsf like the example for the a4j:include component (http://livedemo.exadel.com/a4j-include/) but only in a modal panel. I created my own modal panel component with use of a javascript library and this does work fine. But now i want to test it with the available richFaces component rich:modalPanal and it doesn't work.

      If i put this a4j:include component directly on my page it works also fine but it doesn't work embedded in the rich:modalPanel component. Here is the code snippet with rich:modalPanel:

      <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">testMP</a>
      <rich:modalPanel id="mp" minHeight="200" minWidth="450" zindex="2000">
       <f:facet name="header">
       <h:outputText value="#{msg.registerUser_pageTitle}" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/img/icons/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" />
       </f:facet>
       <a4j:include viewId="/registerUserFormFirst.xhtml"/>
      </rich:modalPanel>
      

      If i put static text on the panel body this text is visible in the viewed panel so the modal panel works correct without any failure. There is also no available exception or log text on system out if a4j:include is used.

      If i put this a4j:include in another rich component e.g. the tabbed pane component like the following code snipped, it does include the registerUserFormFirst.xhtml (we use facelets -> .xhtml) correctly.
      <rich:tabPanel switchType="ajax">
       <rich:tab label="First">
       <a4j:include viewId="/registerUserFormFirst.xhtml"/>
       </rich:tab>
       <rich:tab label="Second" disabled="true">
       Here is tab #2
       </rich:tab>
       <rich:tab label="Third">
       Here is tab #3
       </rich:tab>
      </rich:tabPanel>
      


      Does someone has an idea why a4j:include doesn't work in rich:modalPanel?