2 Replies Latest reply on May 2, 2008 10:21 AM by sovereign

    using HtmlModalPanel

    sovereign

      Hi,

      I am working on the

      rich:modalPanel
      to bring up a modal window in the application on the click of a row in a dataTable using :

      onRowDblClick="javascript:Richfaces.showModalPanel('mppet')"
      .

      The current requirement needs creating a Modal window from the Java code say from the BackingBean or Listener. Is there a way I can create the Modal Window and show the response from the server using Java Code without using any javaScript at all? I saw the component
      HtmlModalPanel
      in the richfaces documentation, so is there a way I can create this modal window using this component and make it popup after the response has come from the server, all using Java code?.

      Thanks a lot in advance.

      Sov

        • 1. Re: using HtmlModalPanel
          ilya_shaikovsky

          You may freelly use binding to create menu from java code. All you need in your case is to add a4j:support to table(also possible from java code if your table generated using binding). Specify onDblClick event, in support. And construct the modal in its action or actionListener, but in order to call the panel js api should be used (e.g. in oncomplete of this support).

          • 2. Re: using HtmlModalPanel
            sovereign

            Thanks for the reply ilya, i appreciate the help. Actually the reqirement is that I need to render the Modal Panel without using any js api.

            I have created the Modal Panel inside the JSF page and I need to invoke the Modal Panel from the Backing Bean i.e. dynamically render the Modal Panel from the Backing Bean code after the response has come back from the server.

            Thank you.