You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ra...@apache.org on 2001/06/07 23:59:02 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls VelocityPortletControl.java
raphael 01/06/07 14:59:02
Modified: src/java/org/apache/jetspeed/portal/controls
VelocityPortletControl.java
Log:
[fix] make sure the context objects are recycled
Revision Changes Path
1.5 +8 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java
Index: VelocityPortletControl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- VelocityPortletControl.java 2001/06/04 17:46:57 1.4
+++ VelocityPortletControl.java 2001/06/07 21:59:01 1.5
@@ -56,6 +56,7 @@
// Turbine stuff
import org.apache.turbine.services.velocity.TurbineVelocity;
+import org.apache.turbine.services.pull.TurbinePull;
import org.apache.turbine.util.Log;
import org.apache.turbine.util.RunData;
import org.apache.turbine.util.RelativeDynamicURI;
@@ -121,12 +122,16 @@
// Create a new Velocity context and load default
// application pull tools
- Context context = TurbineVelocity.getContext(rundata);
+ Context context = TurbineVelocity.getContext();
+ context.put( "data", rundata );
context.put("actions", buildActionList( rundata, portlet ) );
context.put("config", getConfig() );
context.put("skin", portlet.getPortletConfig().getPortletSkin() );
+ // Put the request and session based contexts
+ TurbinePull.populateContext(context, rundata);
+
if ( portlet.getName().equals(PortalState.getCustomized(rundata))
&& (! (portlet instanceof PortletCustomizer) ) )
{
@@ -154,6 +159,8 @@
{
s = e.toString();
}
+
+ TurbineVelocity.requestFinished(context);
return new StringElement( s );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org