portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: Retrieving a portlet's unique instance ID..
Date Mon, 23 Jan 2006 08:50:43 GMT
Jacek Wiƛlicki wrote:
> Wiadomosc od jetspeed@theunderground.net 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: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message