[jboss-user] [JBoss Portal] - Re: Dynamically adding / removing portlets programmatically
steux jean-sebastien
do-not-reply at jboss.com
Mon Jan 3 12:12:17 EST 2011
steux jean-sebastien [http://community.jboss.org/people/jssteux] created the discussion
"Re: Dynamically adding / removing portlets programmatically"
To view the discussion, visit: http://community.jboss.org/message/578416#578416
--------------------------------------------------------------
I have a simpler solution ; In an older projet (jbp 2.6), we also had developped a Specific Interceptor (extends ControllerInterceptor) to add a window like this :
RenderPageCommand rCmd = (RenderPageCommand) cmd;
PortalObjectPath pagePath = rCmd.getTargetId().getPath();
// Set path for dynamic window
String[] names = new String[pagePath.getLength() + 1];
for (int i = 0; i < pagePath.getLength(); i++) {
names[i] = pagePath.getName(i);
}
names[pagePath.getLength()] = "dynamic_" + windowName;
PortalObjectId id = new PortalObjectId(rCmd.getTargetId().getNamespace(), new PortalObjectPath(names));
PortalObject po = getPortalObjectContainer().getObject(id);
rCmd.getWindows().add(po);
I hope it can help you.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578416#578416]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2011]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110103/af26f219/attachment.html
More information about the jboss-user
mailing list