4 Replies Latest reply on Apr 17, 2009 4:07 PM by peterj

    Adding a portlet to an existing portlet page

    malmit

      Is it possible to add a portlet from a different portlet web application to an existing portlet page? Right now, I have to manually add the portlet to the page via the portlet admin console.

        • 1. Re: Adding a portlet to an existing portlet page
          malmit

           

          "malmit" wrote:
          Is it possible to add a portlet from a different portlet web application to an existing portlet page? Right now, I have to manually add the portlet to the page via the portlet admin console.


          I forgot to mention deployment via configuration/deployment descriptor since it is already possible to do this from the web admin console

          • 2. Re: Adding a portlet to an existing portlet page
            • 3. Re: Adding a portlet to an existing portlet page
              malmit

              No, that doesn't help because i'm not using dashboards. Right now the -object.xml file only has overwrite and keep as options when deploying portlets. If I use overwrite then the entire page is replaced with my new portlets and if I use keep then my new portlets are not added to the existing page. Due to the lack of responses, I'm guessing the JBoss Portal V.2.7.0 does not support this feature.

              • 4. Re: Adding a portlet to an existing portlet page
                peterj

                Two options I can think of. One is to log in as admin and add the portlet to the page using the admin portal. The second is to create a second *-object.xml file that places the new portlet on the desired page (yes your project can have multiple *-object.xml files). This *-object.xml file would not create the page, only the portlet window, and it would reference the portlet page. Something like this:

                <deployments>
                 <deployment>
                 <if-exists>keep</if-exists>
                 <parent-ref>portletname.pagename</parent-ref>
                 <window>
                 <window-name>XXXPortletWindow</window-name>
                 <instance-ref>XXXPortletInstance</instance-ref>
                 ...
                 </window>
                 </deployment>
                </deployments>


                Actually, you could probably replace the existing *-object.xml file with the above contents and have it work.