[jboss-user] [JBoss Portal] - Re: Multi-CMSPortletWindow uri change with one URL
cavani
do-not-reply at jboss.com
Wed Jun 25 17:27:10 EDT 2008
This is a simple code that I isolated to further tests:
| public class Listener implements PortalNodeEventListener
| {
|
| public PortalNodeEvent onEvent(final PortalNodeEventContext context, final PortalNodeEvent event)
| {
| if (!(event instanceof WindowNavigationEvent))
| return context.dispatch();
|
| final WindowNavigationEvent windowEvent = (WindowNavigationEvent) event;
|
| final PortalNode node = windowEvent.getNode();
|
| if (!node.getName().equals("Content"))
| return context.dispatch();
|
| final Map<String, String[]> parameters = windowEvent.getParameters();
|
| final String[] param = parameters.get("uri");
|
| if (param == null || param.length == 0 || param[0] == null || param[0].trim().equals(""))
| return context.dispatch();
|
| final String uri = param[0].replace(".html", "_related.html");
|
| final PortalNode otherNode = node.resolve("../Related");
|
| WindowNavigationEvent otherEvent = new WindowNavigationEvent(otherNode);
|
| Map<String, String[]> otheParameters = new HashMap<String, String[]>();
| otheParameters.put("uri", new String[] { uri });
|
| otherEvent.setParameters(otheParameters);
|
| return otherEvent;
| }
|
| }
|
I set this listener on Content window.
Its working as I said before: No Content update, just Related.
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160671#4160671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160671
More information about the jboss-user
mailing list