8 Replies Latest reply on Mar 29, 2007 5:52 AM by ilya_shaikovsky

    modalPanel inside reRendered a4j:include

    hispeedsurfer

      Hi,

      have a modalPanel inside an include

      <h:panelGroup id="center">
       <a4j:outputPanel layout="block" id="first">
       <a4j:include viewId="submit.xhtml" />
       </a4j:outputPanel>
      </h:panelGroup>
      

      submit.xhtml
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:f="http://java.sun.com/jsf/core">
      <h:form id="_form">
      <rich:panel>
       <f:facet name="header">
       <h:outputText value="Modal Panel"/>
       </f:facet>
       <f:verbatim>
       <a href="javascript:Richfaces.showModalPanel('_form:_panel',{left:'auto', top:'auto'})">Show Modal Panel</a>
       </f:verbatim>
       <rich:modalPanel id="_panel" minHeight="200" minWidth="450" height="200" width="500" zindex="999">
       <f:facet name="header">
       <h:outputText value="Modal Panel Title" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/ico_close.gif" style="cursor:pointer" onclick="Richfaces.hideModalPanel('_form:_panel')" />
       </f:facet>
       <f:verbatim>
       <a href="javascript:Richfaces.hideModalPanel('_form:_panel')">Hide this panel</a>
       </f:verbatim>
       </rich:modalPanel>
      </rich:panel>
       </h:form>
      </ui:composition>
      


      When I call submit.xhtml as html directly http://foo:8080/submit.seam all is perfect
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:f="http://java.sun.com/jsf/core">
      <head></head>
      <body>
      <h:form id="_form">
      <rich:panel>
       <f:facet name="header">
       <h:outputText value="Modal Panel"/>
       </f:facet>
       <f:verbatim>
       <a href="javascript:Richfaces.showModalPanel('_form:_panel',{left:'auto', top:'auto'})">Show Modal Panel</a>
       </f:verbatim>
       <rich:modalPanel id="_panel" minHeight="200" minWidth="450" height="200" width="500" zindex="999">
       <f:facet name="header">
       <h:outputText value="Modal Panel Title" />
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/ico_close.gif" style="cursor:pointer" onclick="Richfaces.hideModalPanel('_form:_panel')" />
       </f:facet>
       <f:verbatim>
       <a href="javascript:Richfaces.hideModalPanel('_form:_panel')">Hide this panel</a>
       </f:verbatim>
       </rich:modalPanel>
      </rich:panel>
       </h:form>
      </body>
      </html>
      


      What is the cause of my problem? Any idea?

      Thanks
      Andi