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]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to