1 package org.apache.turbine.modules.pages; 2 3 18 19 import org.apache.turbine.services.velocity.TurbineVelocity; 20 import org.apache.turbine.services.velocity.VelocityService; 21 22 import org.apache.turbine.util.RunData; 23 24 import org.apache.velocity.context.Context; 25 26 34 public class VelocityPage 35 extends TemplatePage 36 { 37 44 protected void doBuildBeforeAction(RunData data) 45 throws Exception 46 { 47 Context context = TurbineVelocity.getContext(data); 48 data.getTemplateInfo() 49 .setTemplateContext(VelocityService.CONTEXT, context); 50 } 51 52 56 protected void doPostBuild(RunData data) 57 throws Exception 58 { 59 Context context = TurbineVelocity.getContext(data); 60 TurbineVelocity.requestFinished(context); 61 } 62 } 63 | Popular Tags |