2 Replies Latest reply on Jul 17, 2008 10:55 AM by vksystech

    rich:modalPanel nor Rendering

      I am using RichFaces 3.1.5 GA, where the modal panel does not get invoked. I have tried onclick, onmousedown, oncomplete etc, but nothing works. Any help would be appreciated.

      Here are the code snippets:
      Seperate xhtml file for modalpanel which contains the foll. code:

      <ui:composition
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:c="http://java.sun.com/jstl/core">
      
       <rich:modalPanel id="deleteConfirm">
       <div id="modalDiv">
       <f:facet name="header">
       <h:outputText value="Delete Confirmation" />
       </f:facet>
       <h:form id="deleteConfirmForm">
       <p><h:outputText value="Are you sure you want to delete the order?" /></p>
       <p>
       <a4j:commandButton id="yes"
       actionListener="#{testBean.markDeletion}"
       action="#{testBean.load}"
       onmousedown="Richfaces.hideModalPanel('deleteConfirm')"
       oncomplete="this.disabled=false" value="Yes" />
       <a4j:commandButton
       id="no" action="#{testBean.load}"
       onmousedown="Richfaces.hideModalPanel('deleteConfirm')"
       oncomplete="this.disabled=false" value="No" />
       </p>
       </h:form>
       </div>
       </rich:modalPanel>
      </ui:composition>
      
      

      The modal panel is invoked in the main page as follows:
      <ui:include src="/views/modalpanel.xhtml" />
      
      <a4j:commandLink id="del" action = "#{orderBean.Test}"
       onclick="javascript:Richfaces.showModalPanel('deleteConfirm',{width:450,height:470})"
       reRender="deleteConfirmForm">
       <h:inputHidden id="hidden" value="#{ui_order.order.oid}" />
       <h:graphicImage id="delete" value="../theme/delete.gif"
       width="15" styleClass="login_img"
       rendered="#{ui_order.visible}" />
      </a4j:commandLink>
      


        • 1. Re: rich:modalPanel nor Rendering
          ilya_shaikovsky

          could you please check current richfaces-demo code from trunk>?

          In calendar example - there is "organizer" page and there modal panel also updated and called from the page and closing after storing edited values.

          • 2. Re: rich:modalPanel nor Rendering

            Is there a sample where the modal panel has command buttons or links with actionlistener and action methods that are invoked? Onmousedown, shows the modal panel but then the Yes button's action methods never get invoked.

            Also the calendar sample uses the mp tag from jbossrichfaces, how is this library different from the richfaces tag for modalpanel, or are they the same?
            Thanks.