2 Replies Latest reply on Mar 8, 2007 2:20 AM by stingray

    Richfaces, Myfaces and Tiles

    stingray

      Hello,

      does RichFaces work with MyFaces and Tiles?

      I have an application running with Myfaces and Tiles. Now I want to add AJAX Components to the application. I started with the Modal Panel.

      I added a commandLink on one of my pages, which calls the modal Panel just as explained in the examples. When clicking on the link nothing happens!

      Afterwards I copy&paste the same code snippet on my template page and it worked!!! So the basic configuration seems to be okay.

      Is there something special to do when working with Tiles?

      Best regards

      Thoams

        • 1. Re: Richfaces, Myfaces and Tiles

          So, you have a problem with modalPanel, but not with RichFaces is general.

          The Richfaces.showModalPanel() function accepts the id of the html tag, but not the id of the component. If you follow the common recommendations and use subview for included tiles, the id of the tag will not correspond to the id of the component.
          For example, if you have:
          <f:subview id="body">
          <rich:modalPanel id="mypanel" .... />
          </f:subview>

          the id will be "body:mypanel", but not just "mypanel". The Richfaces.showModalPanel() requires exactly the "body:mypanel". So, pay attention of the real id you have on the page.
          Not only subview changes the result id. h:form also works like this. If you point to the wrong id, the javascript error should occur

          • 2. Re: Richfaces, Myfaces and Tiles
            stingray

            Thanks a lot for your answer!

            It works now!

            Best regards

            Thomas