David Sean Taylor wrote:

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.
Well, actually there is :)

But it takes a little coding to get hold of it and requires a PortletSession.
I wrote a little utility PortletWindowUtils class which is now provided with 
the portals-bridges-common-1.0.1.jar.

Javadoc:

http://portals.apache.org/bridges/multiproject/portals-bridges-common/apidocs/org/apache/portals/bridges/util/PortletWindowUtils.html#getPortletWindowId(javax.portlet.PortletSession)

Source xref:

  
http://portals.apache.org/bridges/multiproject/portals-bridges-common/xref/org/apache/portals/bridges/util/PortletWindowUtils.html

HTH,

Ate

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