Hi, I have recently been playing around with the bundled version of
jboss-portal-2.2.1RC2. When doing IPC that involves actionURL's there is no
problem and all works well. My problem arises when attempting to do IPC with
renderURL's from portlet A to B. The listener that I have declared picks up a
WindowRenderEvent with the Node name A it seems to run through the code
correctly by returning the correct newEvent of node name B (as well as
parameters etc are all as expected). However, for some reason when the event
that was just returned gets handled by the listener again it is supposed to
have the node name B, but it is still actually A.
The following is the code for my listener. It seems to work OK in the case of
WindowActionEvents but not WindowRenderEvents:
public static class Listener implements PortalNodeEventListener
{
public PortalNodeEvent onEvent(PortalNodeEventBubbler bubbler,
PortalNodeEvent event)
{
PortalNodeEvent newEvent = null;
PortalNode targetWindow = null;
// Get node and the node name
PortalNode node = event.getNode();
String nodeName = node.getName();
if (nodeName.equals("SystemAdminPortletWindow"))
{
targetWindow =
node.resolve("../UserPortletWindow");
}
if (targetWindow != null)
{
if (event instanceof WindowActionEvent)
{
WindowActionEvent targetEvent = null;
WindowActionEvent currentEvent =
(WindowActionEvent) event;
// Setup the target event
targetEvent = new
WindowActionEvent(targetWindow);
targetEvent.setMode(currentEvent.getMode());
targetEvent.setParameters(currentEvent.getParameters());
newEvent = targetEvent;
}
else if (event instanceof WindowRenderEvent)
{
WindowRenderEvent targetEvent = null;
WindowRenderEvent currentEvent =
(WindowRenderEvent) event;
// Setup the target event
targetEvent = new
WindowRenderEvent(targetWindow);
targetEvent.setMode(currentEvent.getMode());
targetEvent.setParameters(currentEvent.getParameters());
newEvent = targetEvent;
}
}
if (newEvent != null)
{
// If we have a new event redirect to it
return newEvent;
}
else
{
// Otherwise bubble up
return bubbler.dispatch(event);
}
}
}
Any help shedding the light on this would be greatly appreciated.
Thanks in advance.
Jason
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928603#3928603
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928603
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user