morciuch 2002/09/30 13:35:36
Modified: src/java/org/apache/jetspeed/modules/actions/portlets
VelocityPortletAction.java
Log:
Fixed issue with VelocityPortletAction events unexpectedly firing for all portlets
of the same type (patch by Scott Weaver)
Revision Changes Path
1.10 +26 -2
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/VelocityPortletAction.java
Index: VelocityPortletAction.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/VelocityPortletAction.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- VelocityPortletAction.java 11 Mar 2002 07:22:11 -0000 1.9
+++ VelocityPortletAction.java 30 Sep 2002 20:35:36 -0000 1.10
@@ -56,6 +56,7 @@
import org.apache.jetspeed.portal.portlets.VelocityPortlet;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
+import org.apache.jetspeed.util.PortletSessionState;
// Turbine stuff
import org.apache.turbine.util.Log;
@@ -115,7 +116,30 @@
{
// process implicit ActionEvent invocation
Log.debug("Action: try executing events");
- executeEvents(rundata, context);
+
+ VelocityPortlet portlet = (VelocityPortlet) context.get("portlet");
+
+ if (portlet != null)
+ {
+ // verify this portlet is the one requested by checking the
+ // js_peid request var. If there is no js_peid
+ // do not worry a about verifing. helps with backward compat.
+ if (rundata.getParameters().getString("js_peid") == null
+ || PortletSessionState.isMyRequest(rundata, portlet))
+ {
+ executeEvents(rundata, context);
+ }
+ else
+ {
+ Log.debug("Action: calling doPerform");
+ doPerform(rundata, context);
+ }
+ }
+ else
+ {
+ executeEvents(rundata, context);
+ }
+
}
catch (NoSuchMethodException e)
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>