Update on this from my side. 

I found that the ContentFragment is not available in an ActionRequest so
I went looking for an alternative. I found I could use;

RequestContext rContext =
(RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV);
String portletId = rContext.getActionWindow().getId().toString(); 

The only niggle I found with it is that it requires the pluto jar file
for development because the context.getActionWindow() returns a pluto
PortletWindow. I was wondering if it made sense to change the API at
some point to return a Jetspeed PortletWindowImpl which implements the
pluto PortletWindow interface. That way only the Jetspeed API jar file
is required for development.

Thanks, Joris.

-----Original Message-----
From: David Sean Taylor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 21, 2007 11:54 AM
To: Jetspeed Users List
Subject: Re: Preferences question


On Mar 21, 2007, at 8:17 AM, Melchior, Joris wrote:

> Thanks David,
>
> I get that bit except for how I get a handle to the portlet  
> instance ID
> from within the portlet itself (in doEdit for example).
>
There is no standard way to get the portlet instance ID.
That said, try this:

((ContentFragment)request.getAttribute 
(PortalReservedParameters.FRAGMENT_ATTRIBUTE)).getId();

What do you need the unique id for ?



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




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

Reply via email to