11 Replies Latest reply on Nov 12, 2008 4:39 AM by ilya_shaikovsky

    ModalPanel with different forms

      Hi All,

      I have to display a completely different whole page(eg: page1) in a modalpanel at the time when I clicked a button in the other page(eg: page2) using JSF.

      Thanks in Advance!!!

        • 1. Re: ModalPanel with different forms

          Could any one give me a valuable suggestions or inputs on this regardings!!!

          Thanks!!

          • 2. Re: ModalPanel with different forms
            pkawiak

            I think you can just place an ifame inside a modal panel with a src attribute set to the page you wish to display.

            <rich:modalPanel id="modalPanel" height="625" width="825">
             <iframe src="http://www.jboss.org/jbossrichfaces/"
             style="height:600px; width:800px;">
             </iframe>
            </rich:modalPanel>
            


            Hope that helps.

            • 3. Re: ModalPanel with different forms
              ilya_shaikovsky

              or as even eassier you could use include pointed to any page via EL binding which will be changed on pressing button.

              • 4. Re: ModalPanel with different forms
                maxmustang

                hi,

                i would try ou a4j:include

                example
                http://livedemo.exadel.com/richfaces-demo/richfaces/include.jsf?c=include&tab=usage

                (i think it shoud work olso inside modalpanel)

                • 5. Re: ModalPanel with different forms

                  Hi All,
                  Thank u (maxmustang,ilya_shaikovsky,pkawiak) very much for ur valuable suggestions...I can do the model panel of a whole page by clicking an outputlink but I cannot do this either by <a4j:commandbutton> or <h:commandbutton>.if I did this by command buttons modelpanel is displayed and with in a fraction of seconds it was disappeared.I had tired a lot but I cant do with the use of commandbuttons.plZ give me a valuable inputs and endorse me on this regarding.

                  Thanks in Advance!!!

                  • 6. Re: ModalPanel with different forms

                    Thanks a lot!!! I had founded the solution..By using <a4j:commandButton>.The mistake I have done here is I had called the javascript (used to show the modelpanel) in the onclick event.Now I had called the javascript in onComplete event so it works perfect...

                    • 7. Re: ModalPanel with different forms

                       

                      example
                      http://livedemo.exadel.com/richfaces-demo/richfaces/include.jsf?c=include&tab=usage .
                      
                      <a4j:inculde> tag is working when I gave the page source in the viewId attribure..
                      my code is
                      
                      <rich:modalPanel id="modelPanel" >
                      <a4j:include viewId="../platform/window/page1.jsf ajaxRendered="true"/>
                      </rich:modelPanel>.
                      
                       but the form is not submitted in the viewed page which comes inside the model panel.also no rerendering action..could any one pls give some valuable inputs on this regardings..
                      
                      
                      


                      • 8. Re: ModalPanel with different forms

                        <a4j:inculde> tag is working when I gave the page source in the viewId attribure..
                        my code is

                        <rich:modalPanel id="modelPanel" >
                        <a4j:include viewId="../platform/window/page1.jsf ajaxRendered="true"/>
                        </rich:modelPanel>
                        .
                        
                         but the form is not submitted in the viewed page which comes inside the model panel.also no rerendering action..could any one pls give some valuable inputs on this regardings..
                        


                        • 9. Re: ModalPanel with different forms
                          ilya_shaikovsky

                          seems you didn't care about two modal panel limitations.

                          modal panel should have its own form inside to submit the panel content. And modal panel should not be inside external form.

                          • 10. Re: ModalPanel with different forms

                            Thank you ilya_shaikovsky for your valuable suggestions...

                            But the page(destinationPage.jsp) which I had specified in the <a4j:include> contains the form..
                            I would like to bring a whole page(destinationPage.jsp) in a model panel by clicking a button in the other page(sourcePage.jsp).

                            My Code is
                            <h:form>
                            ......sourcePage.jsp codes...
                            </h:form>

                            <rich:modalPanel id="modelPanel" autosized="true" moveable="true" styleClass="rich-modalpanel rich-mpnl_panel">
                            <h:form>
                            <a4j:include viewId="../platform/windows/destinationPage.jsp" ajaxRendered="true"/>
                            </h:form>
                            </rich:modalPanel>


                            All the actions included in the destination page is performed but no reRendering is performed in the page...

                            pls give some inputs to resolve this problem..Thanks in Advance!!!

                            • 11. Re: ModalPanel with different forms
                              ilya_shaikovsky

                              please send me simpel war sample (with beans sources) directly if this possible. It will be more simplier to examine it and then answer here with a corrections.