1 16 17 package org.apache.jetspeed.modules.actions.controls; 18 19 import org.apache.turbine.modules.Action; 21 import org.apache.turbine.util.RunData; 22 23 import org.apache.jetspeed.services.rundata.JetspeedRunData; 25 import org.apache.jetspeed.services.resources.JetspeedResources; 26 27 33 public class Print extends Action 34 { 35 36 39 private static final String DEFAULT_TEMPLATE = "content"; 40 41 44 private static final String ACTION_PRINT_TEMPLATE_KEY = "action.print.template"; 45 46 52 public void doPerform( RunData rundata ) throws Exception 53 { 54 55 String peid = rundata.getParameters().getString("js_peid"); 56 if ( peid == null ) 57 { 58 rundata.setScreenTemplate("Ecs"); 59 return; 60 } 61 62 JetspeedRunData jdata = (JetspeedRunData)rundata; 63 jdata.setJs_peid(peid); 64 65 String template = JetspeedResources.getString(ACTION_PRINT_TEMPLATE_KEY, DEFAULT_TEMPLATE); 67 68 rundata.setScreenTemplate(template); 70 } 71 } 72 | Popular Tags |