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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user