O'Reilly logo

GateIn Cookbook by Piergiorgio Lucidi, Luca Stancapiano, Ken Finnigan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing registered portlets using XML

This recipe explains how to attach applications to a page using the XML configuration of GateIn.

Getting ready

Let's assume that you have defined the page as the previous recipe in the same file:

02portal.war/WEB-INF/conf/portal/portal/financials/page.xml

How to do it...

In order to set specific portlets in a page, you need to declare a portlet-application element for each portlet instance you want to use:

  <page>
    <name>contactus</name>
    <title>Contact us</title>
     <access-permissions>Everyone</access-permissions>
     <edit-permission>*:/platform/administrators</edit-permission>
    <portlet-application>
      <portlet>
        <application-ref>web</application-ref>
        <portlet-ref>ContactUsPortlet</portlet-ref>
        <preferences>
 <preference> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required