1 25 package org.ofbiz.webapp.taglib; 26 27 import java.util.HashMap ; 28 import java.util.Map ; 29 import javax.servlet.jsp.JspTagException ; 30 import javax.servlet.jsp.tagext.TagSupport ; 31 32 39 public abstract class AbstractParameterTag extends TagSupport { 40 41 private Map inParameters = null; 42 private Map outParameters = null; 43 44 public void addInParameter(Object name, Object value) { 45 if (this.inParameters == null) 46 this.inParameters = new HashMap (); 47 inParameters.put(name, value); 48 } 49 50 public Map getInParameters() { 51 if (this.inParameters == null) 52 return new HashMap (); 53 else 54 return this.inParameters; 55 } 56 57 public void addOutParameter(Object name, Object alias) { 58 if (this.outParameters == null) 59 this.outParameters = new HashMap (); 60 outParameters.put(name, alias); 61 } 62 63 public Map getOutParameters() { 64 if (this.outParameters == null) 65 return new HashMap (); 66 else 67 return this.outParameters; 68 } 69 70 public int doStartTag() throws JspTagException { 71 inParameters = new HashMap (); 72 return EVAL_BODY_INCLUDE; 73 } 74 75 public abstract int doEndTag() throws JspTagException ; 76 77 } 78 | Popular Tags |