Jacek Wiślicki wrote:
Wiadomosc od [EMAIL PROTECTED] z 2006-01-22 05:19 brzmiala:

Is there a way to get a portlet instance's unique ID without using the
request object (namely, from the portlet init() method)?

As far as I know, init() is common for the whole portlet lifecycle (all instances) and is called at the webapp initialization (once for a restart/deployment), while the unique fragmend ID appears at each rendering the portlet (and it it constant as long as it is not changed in PSML).

In order to get access to all fragments use ContentPage and ContentFragment implementations (getType() method to identify portlets) and recurse through your portal structure parsing each .psml file.

A portlet isn't really supposed to know about its 'unique id' as that is an implementation detail of the portal.

If you want to write portlets specific to Jetspeed-2, have a look at the j2-admin app which accesses portal services in the jetspeed-portlet.xml

<js:services>
        <js:service name='PageManager'/>
        <js:service name='PermissionManager'/>
        <js:service name='PortalAdministration'/>
...
</js:services>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to