Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Declare a dependency on the pluto-porta plugin
    Code Block
    XMLXMLborderStylesolid
    <dependencies>
        ...
    <dependency>
        <groupId>org.apache.geronimo.plugins</groupId>
        <artifactId>pluto-support</artifactId>
    </dependency>
    </dependencies>
    
  2. Define an AdminConsoleExtensionGBean
    Code Block
    XML
    XML
    borderStylesolid
    <gbean name="example" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
        <attribute name="pageTitle">Testing</attribute>
        <attribute name="portletContext">/HelloWorldPortlet</attribute>
        <attribute name="portletList">[HelloWorldPortlet]</attribute>
    </gbean>
    
    where the attributes are defined as follows:
  • pageTitle is the name of the page to add these portlets to (new or existing)
  • portletContext is the context of where the portlets are installed.
  • portletList is a comma-delimited list of the portlets to be added to this page.
XML
Code Block
XML
borderStylesolid
titleSample geronimo-web.xml
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
    <environment>
        <moduleId>
            <groupId>org.apache.geronimo.portals</groupId>
            <artifactId>pluto-example</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>war</type>
        </moduleId>
        
        <dependencies>
            <dependency> <!-- Put a dependancy on the hosting portal (pluto) -->
                <groupId>org.apache.geronimo.plugins</groupId>
                <artifactId>pluto-support</artifactId>
            </dependency>
        </dependencies>
    </environment>
    
    <!-- This is where the files are accessed from. (aka - portletContext) -->
    <context-root>/HelloWorldPortlet</context-root>
    
    <!-- Start off a ACEGBean, this is the lifecycle for the portlet -->
    <gbean name="PlutoTest" class="org.apache.geronimo.pluto.AdminConsoleExtensionGBean">
        <attribute name="pageTitle">Hello</attribute>
        <attribute name="portletContext">/HelloWorldPortlet</attribute>
        <attribute name="portletList">[HelloWorldPortlet]</attribute>
        <reference name="PortalContainerServices">
            <name>PlutoPortalServices</name>
        </reference>
    </gbean>
</web-app>

...