7 Replies Latest reply on Mar 29, 2012 7:00 PM by pepmecho

    Problem with modalPanel

    pepmecho

      Hi, I'm using Richfaces 3.3.3 and JSF 1.2 and I have a problem displaying a <rich:modalPanel>. The thing is de modal panel it's displayed in the same page, not as a pop-up. It displays at the botom of the page. I tried everithing and nothig works. If someone can help me I'll be very thankful.

       

      P.D.: Sorry for my english.

        • 1. Re: Problem with modalPanel
          sunkaram

          please post your code..

          • 2. Re: Problem with modalPanel
            pepmecho

            Sorry. I didn't post it because a tried a lot of different codes and nothing works. Here is an example:

             

             

            <?xml version="1.0" encoding="iso-8859-1"?>

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:rich="http://richfaces.org/rich" >

             

            <ui:composition>

             

               <h:form>

                 <h:outputLink value="#" id="link">

                   Open Modal

                   <rich:componentControl for="modalPanel" attachTo="link" operation="show" event="onclick"/>

                </h:outputLink>

              </h:form>

             

              <rich:modalPanel id="modalPanel" >

                          <h:outputText value="Sample"/>

              </rich:modalPanel>

             

            </ui:composition>

             

            </html>

             

             

            I forgot to said that besides open the modal onthe same page (not as pop-up), there are two very small buttons at the bottom of the original page (above the content of the pop-up) that  apparently do nothing.

            Here I post an image to you can see clearly my problem. I edited the screen capture to made it shorter, but  essentially that is what is happening to me. The content of de modal panel is shown much below that what is seen in the image.

             

            ModalPanel problem.jpg

             

            Thanks

            • 3. Re: Problem with modalPanel
              sunkaram

              looks like required richfaces stylesheets are not loaded...

              • 4. Re: Problem with modalPanel
                pepmecho

                And why could this be happening?

                 

                Yesterday something strange happened. That error happened on the first page of my aplication. I need the modal on the template of my aplication (as a registration modal in the aplication header). I also have a modal on another page. The weird thing is if I put the modal on the template, the modal on the other page does the same I told before, but if I take off the modal from the template, the other modal works fine. I hope give you a clue with this. Thanks

                • 5. Re: Problem with modalPanel
                  sunkaram

                  anyway you are not using any template. So, remove <ui:composition> tags from the page and try..

                  • 6. Re: Problem with modalPanel
                    pepmecho

                    I tried removing <ui:composition> and still it doesn't works. Anyway I need to use templates, so removing this doesn't work for me.

                    You said earlier that the problem may be that the required stylesheet is not loaded. How can I find out if that is the problem?

                    • 7. Re: Problem with modalPanel
                      pepmecho

                      Well, finaly I could solved the problem. It was in fact the stylesheet of the modalPanel. I had a restriction on my code which don't allow to load the stylesheet. Thanks Maheswara Sunkara for all your help. Bye