1 package org.tigris.scarab.actions.admin; 2 3 48 49 import org.apache.turbine.TemplateContext; 51 import org.apache.turbine.RunData; 52 53 import org.tigris.scarab.actions.base.RequireLoginFirstAction; 55 import org.tigris.scarab.pipeline.SetInfoMessageValve; 56 import org.tigris.scarab.tools.ScarabRequestTool; 57 58 65 public class SetInfoMessage extends RequireLoginFirstAction 66 { 67 public void doPerform(RunData data, TemplateContext context) 68 throws Exception 69 { 70 String msg = data.getParameters().getString("msg"); 71 ScarabRequestTool scarabR = getScarabRequestTool(context); 72 if (msg == null || msg.trim().length() == 0) 73 { 74 SetInfoMessageValve.setMessage(null); 75 scarabR.setInfoMessage(null); 76 } 77 else 78 { 79 SetInfoMessageValve.setMessage(msg); 80 scarabR.setInfoMessage(msg); 81 } 82 } 83 } 84 | Popular Tags |