1 package org.apache.turbine.modules.screens; 2 3 18 19 import org.apache.commons.lang.StringUtils; 20 21 import org.apache.ecs.ConcreteElement; 22 23 import org.apache.turbine.TurbineConstants; 24 import org.apache.turbine.services.jsp.TurbineJsp; 25 import org.apache.turbine.services.template.TurbineTemplate; 26 import org.apache.turbine.util.RunData; 27 28 37 public class BaseJspScreen 38 extends TemplateScreen 39 { 40 41 private String prefix = TurbineConstants.SCREEN_PREFIX + "/"; 42 43 50 public ConcreteElement buildTemplate(RunData data) 51 throws Exception 52 { 53 String screenTemplate = data.getTemplateInfo().getScreenTemplate(); 54 String templateName 56 = TurbineTemplate.getScreenTemplateName(screenTemplate); 57 58 if (StringUtils.isEmpty(templateName)) 60 { 61 log.error("Screen " + screenTemplate + " not found!"); 62 throw new Exception ("Could not find screen for " + screenTemplate); 63 } 64 65 TurbineJsp.handleRequest(data, prefix + templateName, 67 getLayout(data) == null); 68 69 return null; 70 } 71 72 78 protected void doBuildTemplate(RunData data) 79 throws Exception 80 { 81 } 82 } 83 | Popular Tags |