2 Replies Latest reply on Apr 26, 2007 8:33 AM by Rawan Barakat

    running modalpanel example

    Rawan Barakat Newbie

      hi,

      im trying to run the modalPanel example i attached my code but when i run it i get javascript error that RichFaces.showModalPanel is undefined ?

      here is my code
      <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

      RichFaces Modal Panel is a container that blocks the operation on the base page when the modal
      panel is shown.
      You can show the modal panel using the folowing javascript function: Richfaces.hideModalPanel(id, params).
      For example, <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">
      Richfaces.showModalPanel('mp',{width:450, top:200})


      <rich:modalPanel id="mp" minHeight="200" minWidth="450"
      height="200" width="500" zindex="2000">
      <f:facet name="header">
      <h:outputText value="Modal Panel Title" />
      </f:facet>
      <f:facet name="controls">
      <h:graphicImage value="/images/modal/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" />
      </f:facet>
      Any JSF content might be inside the panel. In case of using
      Facelets or JSF 1.2, it might be any mixed content.

      The RichFaces modal panel is good with &lt;a4j:include&gt; to create
      a wizard like behavior.
      The model panel is open and closed from the javascript function
      on Richfaces object. The following code
      <a href="javascript:Richfaces.hideModalPanel('mp')">hide this panel:
      Richfaces.hideModalPanel('mp')

      </rich:modalPanel>