You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Charith Indika Fernando <ch...@virtusa.com> on 2003/11/10 06:17:27 UTC

portletentityregistry.xml and pageregistry.xml

hi all 

can somebody give me an introduction of the following files pls

portletentityregistry.xml and pageregistry.xml
as in what they exist for and what kind of stuff that u have to define inside them

thanks
regards charith


Re: portletentityregistry.xml and pageregistry.xml

Posted by "Choong Yong, Koh" <du...@mailhost.net>.
Let me attempt. :)

pageregistry.xml describes the layout of the portal in pluto.  If you 
replace the correct sections in the default pageregistry.xml file with 
the following fragment, you will see that the 2 portlets are displayed 
one on top of another instead of side-by-side.  The attribute for 
"value" in the <property> tag is a reference to the application id and 
portlet id in portletentityregistry.xml (see discussion below).

        <fragment name="row" type="row">
            <fragment name="col1" type="column">
                <fragment name="p1" type="portlet">
                    <property name="portlet" value="3.1"/>
                </fragment>
            </fragment>

        </fragment>
        <fragment name="row2" type="row">
            <fragment name="col2" type="column">
                <fragment name="p2" type="portlet">
                    <property name="portlet" value="4.1"/>
                </fragment>
            </fragment>
        </fragment>


portletentityregistry.xml describes the portlets available in the portal.

Each <application> tag defines one application (corresponding to one 
web-app on the portal container), which can contain multiple <portlet> 
tags.  The "id" attribute in this tag identifies the application, and it 
does not necessary needs to be numeral.

The <definition-id> tag within the <application> refers to the name of 
the web-app that contains the portlets in this application.

Each <portlet> tag defines one portlet.  Similarly the "id" attribute in 
this tag identifies the portlet. Note that the application id 
concatenated with the portlet id will be mapped to the "value" attribute 
in the <proprety> tag in pageregistry.xml

The <definition-id> within the <portlet> is a concatenated id string 
identifying the portlet within the application.  This is a reference to 
the <portlet-name> tag in the portlet.xml in the respective web-app.  In 
the default setting,
            <definition-id>testsuite.TestPortlet2</definition-id>
the portlet referred to was the TestPortlet2 portlet within the 
testsuite web-app.

Each <preferences> tag within the <portlet> tag defines name/value pairs 
for the PorletPreferences.  These values can be retrieved within the 
JSPs using the following code fragment:
     PortletPreferences preferences = renderRequest.getPreferences();
     String testPermanence =  preferences.getValue("TEST_PERMANENCE", 
"Default");
     out.println(testPermanence);

Hope this helps.

Choong Yong, Koh


Charith Indika Fernando wrote:

> hi all
>
> can somebody give me an introduction of the following files pls
>
> portletentityregistry.xml and pageregistry.xml
> as in what they exist for and what kind of stuff that u have to define 
> inside them
>
> thanks
> regards charith
>