1 5 package com.opensymphony.webwork.views.jsp; 6 7 import org.apache.commons.logging.Log; 8 import org.apache.commons.logging.LogFactory; 9 10 import java.util.HashMap ; 11 import java.util.Map ; 12 13 14 21 public abstract class ParameterizedTagSupport extends WebWorkTagSupport implements ParamTag.Parametric { 22 24 final protected static Log log = LogFactory.getLog(ParameterizedTagSupport.class); 25 26 28 Map params; 29 30 32 public Map getParameters() { 33 if (params == null) { 34 params = new HashMap (); 35 } 36 37 return params; 38 } 39 40 public void addParameter(String key, Object value) { 41 if (key != null) { 42 Map myParams = getParameters(); 43 44 if (value == null) { 45 myParams.remove(key); 46 } else { 47 params.put(key, value); 48 } 49 } 50 } 51 52 59 protected void reset() { 60 this.getParameters().clear(); 61 } 62 } 63 | Popular Tags |