Hi,

I'm not sure Is it a perfect place to put Pull Objects into VelocityContext at the 
beginning.
when we finalize a perfect place , then we can use requestPull method as a interface 
method.

Thanks 

youngho

Index: TurbineVelocityService.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-turbine/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java,v

retrieving revision 1.47
diff -u -r1.47 TurbineVelocityService.java

 @@ -208,29 +208,34 @@
          */
         Context context = (Context)
             data.getTemplateInfo().getTemplateContext(VelocityService.CONTEXT);
-        
+
         if (context == null)
         {
             context = getContext();
             context.put ( "data", data );
 
-            if (pullModelActive)
-            {
-                /*
-                 * Populate the toolbox with request scope, session scope
-                 * and persistent scope tools (global tools are already in
-                 * the toolBoxContent which has been wrapped to construct
-                 * this request-specific context).
-                 */
-                TurbinePull.populateContext(context, data);
-            }
-            
+          requestPull( context , data );
+
             data.getTemplateInfo().setTemplateContext(
                 VelocityService.CONTEXT, context);
         }
         return context;
     }
-    
+
+ public void requestPull(Context context , RunData data)
+ {
+        if (pullModelActive)
+        {
+            /*
+             * Populate the toolbox with request scope, session scope
+             * and persistent scope tools (global tools are already in
+             * the toolBoxContent which has been wrapped to construct
+             * this request-specific context).
+             */
+            TurbinePull.populateContext(context, data);
+        }
+ }
+

Reply via email to