-
1. Re: Feature request: Unique identifier of a portlet instance
mvoopentext Jan 24, 2006 12:22 PM (in response to mvoopentext)And yes, you can build this information by using JBossRenderRequest.getPortalNode(), but this is tedious.
-
2. Re: Feature request: Unique identifier of a portlet instance
julien1 Jan 24, 2006 12:45 PM (in response to mvoopentext)how tedious is it ? can you give an example ?
-
3. Re: Feature request: Unique identifier of a portlet instance
mvoopentext Jan 24, 2006 1:04 PM (in response to mvoopentext)Basically all the information this method computes already exists in the object i mentioned before
private String resolveId(JBossRenderRequest request)
{
String result = null;
List list = new ArrayList(10);
PortalNode node = request.getPortalNode();
while(node != null && node.getName().trim().length() >0)
{
list.add(node.getName());
node = node.getParent();
}
StringBuffer buffer = new StringBuffer();
for (int i = list.size() -1; i>=0; i--)
{
buffer.append(".");
buffer.append((String) list.get(i));
}
if(buffer.length() > 0)
{
result = buffer.substring(1);
}
return result;
} -
4. Re: Feature request: Unique identifier of a portlet instance
julien1 Jan 24, 2006 1:16 PM (in response to mvoopentext)so actually you are building rather a unique window it, don't you ?
what modifs would you need ? -
5. Re: Feature request: Unique identifier of a portlet instance
mvoopentext Jan 25, 2006 2:49 AM (in response to mvoopentext)Basically yes, you seem to define window id as "portlet instance on a portal page".
I sugggest to add this code to org.jboss.portal.portlet.impl.PortletRequestImpl:
public String getWindowId()
{
return instanceContext.getWindowId()
}
From my debugging introspections this contains the same value as the method i posted earlier.