1 16 17 package org.apache.jetspeed.modules.pages; 18 19 import org.apache.turbine.util.RunData; 20 import org.apache.turbine.services.velocity.TurbineVelocity; 21 import org.apache.turbine.services.velocity.VelocityService; 22 import org.apache.velocity.context.Context; 23 import org.apache.jetspeed.util.template.JetspeedTemplateNavigation; 24 25 31 public class JetspeedVelocityPage extends JetspeedTemplatePage 32 { 33 42 protected void doBuildBeforeAction(RunData data) throws Exception 43 { 44 super.doBuildBeforeAction(data); 45 46 Context context = TurbineVelocity.getContext(data); 47 48 context.put("jnavigation", new JetspeedTemplateNavigation(data)); 49 data.getTemplateInfo().setTemplateContext(VelocityService.CONTEXT, context); 50 } 51 52 56 protected void doPostBuild(RunData data) throws Exception 57 { 58 Context context = TurbineVelocity.getContext(data); 59 TurbineVelocity.requestFinished(context); 60 } 61 62 } 63 | Popular Tags |