2 Replies Latest reply on Feb 22, 2008 6:54 AM by Valtoni Boaventura

    modalPanel content

    Kevin Gutch Newbie

      Hi when using <rich:modalPanel is there anyway to have the content of the panel only be included once the modalPanel has been clicked/selected? Currently the content of the panel seems to be within the page but just hidden.

      This just seems like extra content that may or may not be used in page (depending on whether the user selects the modalPanel)

      I have tried <a4j:include viewId= ajaxRendered="true" but that does not seem to do it.

      Is the only way to do it with some sort of backing bean value that gets changed onclick?

        • 1. Re: modalPanel content
          <todo> <todo> Newbie

          You can place content of modalPanel in simple container, h:panelGroup, for example.
          To call method from managed bean and show modal panel use a4j:commandButton, a4j:commandLink, etc. Set action attribute and put "Richfaces.showModalPanel('...')" in oncomplete attribute.

          • 2. Re: modalPanel content
            Valtoni Boaventura Newbie

            Hmmm...
            It's sound like a bug! I do strictly this:

            <a4j:commandLink action="#{ucAplicacao.seleciona}"
             reRender="mpEdicao"
             value="#{apl.aplicacao}"
             oncomplete="javascript:Richfaces.showModalPanel('mpEdicao');"/>
            


            And nothing... The modal panel "mpEdicao" appear with style "visible: none". When i cut off the "reRender" directive, this works perfectly.

            The curious about this: it's works fine with 3.0.0 rich faces, and stop working in rich faces 3.1.0. (?!?!)