Commits

plightbo  committed a14911d

param tag works exactly like it did in 1.4

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@365573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 47b0af7

Comments (0)

Files changed (36)

File src/java/com/opensymphony/webwork/views/jsp/BeanTag.java

  * @author Brock Bulger
  * @version $Revision$
  */
-public class BeanTag extends WebWorkTagSupport implements ParameterizedTag {
+public class BeanTag extends WebWorkTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     protected static Log log = LogFactory.getLog(BeanTag.class);
         this.name = name;
     }
 
-    public Map getParams() {
+    public Map getParameters() {
         return null;
     }
 
-    public void addParam(String key, Object value) {
+    public void addParameter(String key, Object value) {
         OgnlUtil.setProperty(findString(key), value, bean, getStack().getContext());
     }
 

File src/java/com/opensymphony/webwork/views/jsp/IncludeTag.java

  * @author <a href="mailto:scott@atlassian.com">Scott Farquhar</a>
  * @version $Revision$
  */
-public class IncludeTag extends WebWorkBodyTagSupport implements ParameterizedTag {
+public class IncludeTag extends WebWorkBodyTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     private static String encoding;
     }
 
     /* (non-Javadoc)
-    * @see com.opensymphony.webwork.views.jsp.ParameterizedTag#getParams()
+    * @see com.opensymphony.webwork.views.jsp.ParameterizedTag#getParameters()
     */
-    public Map getParams() {
+    public Map getParameters() {
         return params;
     }
 
     * @param   name
     * @param   value
     */
-    public void addParam(String name, Object value) {
+    public void addParameter(String name, Object value) {
         if (value != null) {
             List currentValues = (List) params.get(name);
 

File src/java/com/opensymphony/webwork/views/jsp/ParamTag.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
 package com.opensymphony.webwork.views.jsp;
 
-import com.opensymphony.xwork.util.OgnlValueStack;
-
-import org.apache.velocity.context.Context;
-
-import java.io.Writer;
-
 import javax.servlet.jsp.JspException;
-
+import java.util.Map;
 
 /**
+ * This tag can be used to parameterize other tags, who implement
+ * the ParametricTag interface declared here.
+ * <p/>
+ * The IncludeTag and BeanTag are examples of such tags.
+ * <p/>
+ * The inner classes, Parametric and UnnamedParametric, are implemented by tags. They indicate that a
+ * particular Tag may have embedded params.  For example, if we were wanted to use the ComponentTag
+ * and wanted to provide custom params to assist with the rendering, we could declare something like
+ * <p/>
+ * <pre>
+ * &lt;ui:component&gt;
+ *  &lt;ui:param name="key"     value="[0]"/&gt;
+ *  &lt;ui:param name="value"   value="[1]"/&gt;
+ *  &lt;ui:param name="context" value="[2]"/&gt;
+ * &lt;/ui:component&gt;
+ * </pre>
+ * <p/>
+ * where the key will be the identifier and the value the result of an OGNL expression run against the current
+ * OgnlValueStack
  *
- *
- * @author $Author$
- * @version $Revision$
+ * @author Rickard �berg (rickard@dreambean.com)
+ * @see com.opensymphony.webwork.views.jsp.IncludeTag
+ * @see com.opensymphony.webwork.views.jsp.BeanTag
  */
-public class ParamTag extends WebWorkTagSupport {
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    String name;
-    String value;
-
-    //~ Methods ////////////////////////////////////////////////////////////////
+public class ParamTag extends WebWorkBodyTagSupport {
+    // Attributes ----------------------------------------------------
+    protected String nameAttr;
+    protected String valueAttr;
 
-    public void setName(String name) {
-        this.name = name;
+    public void setName(String aName) {
+        nameAttr = aName;
     }
 
-    public void setValue(String value) {
-        this.value = value;
+    public void setValue(String aName) {
+        valueAttr = aName;
     }
 
-    public int doStartTag() throws JspException {
-        ParameterizedTag parent = (ParameterizedTag) findAncestorWithClass(this, ParameterizedTag.class);
-
-        if (parent != null) {
-            Object o = null;
-
-            if (value == null) {
-                value = "top";
+    // BodyTag implementation ----------------------------------------
+    public int doEndTag() throws JspException {
+        Parametric parametricTag = (Parametric) findAncestorWithClass(this, Parametric.class);
+        if (parametricTag != null) {
+            if (valueAttr != null) {
+                if (parametricTag instanceof UnnamedParametric) {
+                    ((UnnamedParametric) parametricTag).addParameter(findValue(valueAttr));
+                } else {
+                    Object name = findValue(nameAttr);
+
+                    if (name == null) {
+                        throw new JspException("No name found for following expression: " + nameAttr);
+                    }
+
+                    Object value = findValue(valueAttr);
+                    parametricTag.addParameter(name.toString(), value);
+                }
+            } else {
+                String content = null;
+                if (!(bodyContent != null && (content = bodyContent.getString()).length() != 0)) {
+                    content = null; // No value
+                }
+
+                if (parametricTag instanceof UnnamedParametric) {
+                    ((UnnamedParametric) parametricTag).addParameter(content);
+                } else {
+                    parametricTag.addParameter(findString(nameAttr), content);
+                }
             }
+        }
+        return EVAL_PAGE;
+    }
 
-            o = findValue(value);
+    // Inner classes -------------------------------------------------
+    public interface Parametric {
+        public Map getParameters();
 
-            parent.addParam(name, o);
-        }
+        public void addParameter(String name, Object value);
+    }
 
-        return SKIP_BODY;
+    public interface UnnamedParametric extends Parametric {
+        public void addParameter(Object value);
     }
 }
+
+

File src/java/com/opensymphony/webwork/views/jsp/ParametereizedBodyTagSupport.java

  * Date: Nov 16, 2003
  * Time: 3:25:09 PM
  */
-public class ParametereizedBodyTagSupport extends WebWorkBodyTagSupport implements ParameterizedTag {
+public class ParametereizedBodyTagSupport extends WebWorkBodyTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     final protected static Log log = LogFactory.getLog(ParameterizedTagSupport.class);
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
-    public Map getParams() {
+    public Map getParameters() {
         if (params == null) {
             params = new HashMap();
         }
         return params;
     }
 
-    public void addParam(String key, Object value) {
+    public void addParameter(String key, Object value) {
         if (key != null) {
-            Map myParams = getParams();
+            Map myParams = getParameters();
 
             if (value == null) {
                 myParams.remove(key);

File src/java/com/opensymphony/webwork/views/jsp/ParameterizedTag.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-package com.opensymphony.webwork.views.jsp;
-
-import java.util.Map;
-
-
-/**
- * The ParameterizedTag indicates that a particular Tag may have embedded params.  For example, if we were wanted to
- * use the ComponentTag and wanted to provide custom params to assist with the rendering, we could declare something
- * like
- *
- * <pre>
- * &lt;ui:component&gt;
- *  &lt;ui:param name="key"     value="[0]"/&gt;
- *  &lt;ui:param name="value"   value="[1]"/&gt;
- *  &lt;ui:param name="context" value="[2]"/&gt;
- * &lt;/ui:component&gt;
- * </pre>
- *
- * where the key will be the identifier and the value the result of an OGNL expression run against the current
- * OgnlValueStack
- *
- * @see com.opensymphony.xwork.util.OgnlValueStack
- * @author $Author$
- * @version $Revision$
- */
-public interface ParameterizedTag {
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    /**
-     * This method is intended to be called by the Velocity Template when it needs to render the widget
-     * @return a map of user defined parmeters
-     */
-    public Map getParams();
-
-    /**
-     * This method is intended to be called via the ParamTag
-     * @param key the identifier to be used to retrieve the param
-     * @param value the Object to be stored, not an Ognl expression!  While an Ognl expression may be used to derive
-     * this Object, the Object itself should be passed, not the expression.
-     */
-    public void addParam(String key, Object value);
-}

File src/java/com/opensymphony/webwork/views/jsp/ParameterizedTagSupport.java

  * Time: 11:00:38 PM
  * To change this template use Options | File Templates.
  */
-public abstract class ParameterizedTagSupport extends WebWorkTagSupport implements ParameterizedTag {
+public abstract class ParameterizedTagSupport extends WebWorkTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     final protected static Log log = LogFactory.getLog(ParameterizedTagSupport.class);
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
-    public Map getParams() {
+    public Map getParameters() {
         if (params == null) {
             params = new HashMap();
         }
         return params;
     }
 
-    public void addParam(String key, Object value) {
+    public void addParameter(String key, Object value) {
         if (key != null) {
-            Map myParams = getParams();
+            Map myParams = getParameters();
 
             if (value == null) {
                 myParams.remove(key);
      * </p>
      */
     protected void reset() {
-        this.getParams().clear();
+        this.getParameters().clear();
     }
 }

File src/java/com/opensymphony/webwork/views/jsp/iterator/IteratorGeneratorTag.java

     public int doStartTag() throws JspException {
         super.doStartTag();
 
-        addParam("values", findValue(valueAttr));
+        addParameter("values", findValue(valueAttr));
 
         if (countAttr != null) {
-            addParam("count", findValue(countAttr));
+            addParameter("count", findValue(countAttr));
         }
 
         if (separatorAttr != null) {
-            addParam("separator", findValue(separatorAttr));
+            addParameter("separator", findValue(separatorAttr));
         }
 
         return EVAL_BODY_INCLUDE;

File src/java/com/opensymphony/webwork/views/jsp/iterator/SortIteratorTag.java

         int returnVal = super.doStartTag();
 
         if (sourceAttr == null) {
-            addParam("source", findValue("top"));
+            addParameter("source", findValue("top"));
         } else {
-            addParam("source", findValue(sourceAttr));
+            addParameter("source", findValue(sourceAttr));
         }
 
         Comparator c = (Comparator) findValue(comparatorAttr);
-        addParam("comparator", c);
+        addParameter("comparator", c);
 
         return returnVal;
     }

File src/java/com/opensymphony/webwork/views/jsp/iterator/SubsetIteratorTag.java

         int returnVal = super.doStartTag();
 
         if (sourceAttr == null) {
-            addParam("source", findValue("top"));
+            addParameter("source", findValue("top"));
         } else {
-            addParam("source", findValue(sourceAttr));
+            addParameter("source", findValue(sourceAttr));
         }
 
         if (countAttr != null) {
-            addParam("count", findValue(countAttr));
+            addParameter("count", findValue(countAttr));
         }
 
         if (startAttr != null) {
-            addParam("start", findValue(startAttr));
+            addParameter("start", findValue(startAttr));
         }
 
         return returnVal;

File src/java/com/opensymphony/webwork/views/jsp/ui/AbstractDoubleListTag.java

         
         if (doubleNameAttr != null) {
             doubleName = findValue(doubleNameAttr, String.class);
-            addParam("doubleName", doubleName);
+            addParameter("doubleName", doubleName);
         }
         
         if (doubleListAttr != null) {
-            addParam("doubleList", doubleListAttr);
+            addParameter("doubleList", doubleListAttr);
         }
 
         if (doubleListKeyAttr != null) {
-            addParam("doubleListKey", doubleListKeyAttr);
+            addParameter("doubleListKey", doubleListKeyAttr);
         }
 
         if (doubleListValueAttr != null) {
-            addParam("doubleListValue", doubleListValueAttr);
+            addParameter("doubleListValue", doubleListValueAttr);
         }
         
         Class valueClazz = getValueClassType();
 
         if (valueClazz != null) {
             if (doubleValueAttr != null) {
-                addParam("doubleNameValue", findValue(doubleValueAttr, valueClazz));
+                addParameter("doubleNameValue", findValue(doubleValueAttr, valueClazz));
             } else if (doubleName != null) {
-                addParam("doubleNameValue", findValue(doubleName.toString(), valueClazz));
+                addParameter("doubleNameValue", findValue(doubleName.toString(), valueClazz));
             }
         } else {
             if (doubleValueAttr != null) {
-                addParam("doubleNameValue", findValue(doubleValueAttr));
+                addParameter("doubleNameValue", findValue(doubleValueAttr));
             } else if (doubleName != null) {
-                addParam("doubleNameValue", findValue(doubleName.toString()));
+                addParameter("doubleNameValue", findValue(doubleName.toString()));
             }
         }
     }

File src/java/com/opensymphony/webwork/views/jsp/ui/AbstractListTag.java

         Object value = findValue(listAttr);
         if (listAttr != null) {
             if (value instanceof Collection) {
-                addParam("list", value);
-                addParam("listSize", new Integer(((Collection) value).size()));
+                addParameter("list", value);
+                addParameter("listSize", new Integer(((Collection) value).size()));
             }
             else {
-                addParam("list", MakeIterator.convert(value));
+                addParameter("list", MakeIterator.convert(value));
             }
         }
 
         if (listKeyAttr != null) {
-            addParam("listKey", listKeyAttr);
+            addParameter("listKey", listKeyAttr);
         } else if (value instanceof Map) {
-            addParam("listKey", "key");
+            addParameter("listKey", "key");
         }
 
         if (listValueAttr != null) {
-            addParam("listValue", listValueAttr);
+            addParameter("listValue", listValueAttr);
         } else if (value instanceof Map) {
-            addParam("listValue", "value");
+            addParameter("listValue", "value");
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/AbstractUITag.java

 
         if (nameAttr != null) {
             name = findValue(nameAttr, String.class);
-            addParam("name", name);
+            addParameter("name", name);
         }
 
         if (labelAttr != null) {
-            addParam("label", findValue(labelAttr, String.class));
+            addParameter("label", findValue(labelAttr, String.class));
         }
 
         if (labelPositionAttr != null) {
-            addParam("labelPosition", findValue(labelPositionAttr, String.class));
+            addParameter("labelPosition", findValue(labelPositionAttr, String.class));
         }
 
         if (requiredAttr != null) {
-            addParam("required", findValue(requiredAttr, Boolean.class));
+            addParameter("required", findValue(requiredAttr, Boolean.class));
         }
 
         if (disabledAttr != null) {
-            addParam("disabled", findValue(disabledAttr, Boolean.class));
+            addParameter("disabled", findValue(disabledAttr, Boolean.class));
         }
 
         if (tabindexAttr != null) {
-            addParam("tabindex", findValue(tabindexAttr, String.class));
+            addParameter("tabindex", findValue(tabindexAttr, String.class));
         }
 
         if (onchangeAttr != null) {
-            addParam("onchange", findValue(onchangeAttr, String.class));
+            addParameter("onchange", findValue(onchangeAttr, String.class));
         }
 
         if (classAttr != null) {
-            addParam("class", findValue(classAttr, String.class));
+            addParameter("class", findValue(classAttr, String.class));
         }
 
         FormTag tag = (FormTag) findAncestorWithClass(this, FormTag.class);
         if (tag != null)
         {
-            addParam("form", tag.getParams());
+            addParameter("form", tag.getParameters());
         }
 
         Class valueClazz = getValueClassType();
 
         if (valueClazz != null) {
             if (valueAttr != null) {
-                addParam("nameValue", findValue(valueAttr, valueClazz));
+                addParameter("nameValue", findValue(valueAttr, valueClazz));
             } else if (name != null) {
-                addParam("nameValue", findValue(name.toString(), valueClazz));
+                addParameter("nameValue", findValue(name.toString(), valueClazz));
             }
         } else {
             if (valueAttr != null) {
-                addParam("nameValue", findValue(valueAttr));
+                addParameter("nameValue", findValue(valueAttr));
             } else if (name != null) {
-                addParam("nameValue", findValue(name.toString()));
+                addParameter("nameValue", findValue(name.toString()));
             }
         }
 
         if (id != null) {
-            addParam("id", getId());
+            addParameter("id", getId());
         }
 
         evaluateExtraParams(stack);
          * the request, it might also make sense for consistency to send the page and res and any others.
          */
         context.put("tag", this);
-        context.put("parameters", getParams());
+        context.put("parameters", getParameters());
 
         t.merge(context, outputWriter);
     }

File src/java/com/opensymphony/webwork/views/jsp/ui/CheckboxTag.java

 
     protected void evaluateExtraParams(OgnlValueStack stack) {
         if (fieldValueAttr != null) {
-            addParam("fieldValue", findValue(fieldValueAttr, String.class));
+            addParameter("fieldValue", findValue(fieldValueAttr, String.class));
         }
     }
 }

File src/java/com/opensymphony/webwork/views/jsp/ui/ComboBoxTag.java

 
     protected void evaluateExtraParams(OgnlValueStack stack) {
         if (list != null) {
-            addParam("list", findValue(list));
+            addParameter("list", findValue(list));
         }
 
         if (sizeAttr != null) {
-            addParam("size", findValue(sizeAttr));
+            addParameter("size", findValue(sizeAttr));
         }
 
         if (maxlengthAttr != null) {
-            addParam("maxlength", findValue(maxlengthAttr));
+            addParameter("maxlength", findValue(maxlengthAttr));
         }
 
         if (onkeyupAttr != null) {
-            addParam("onkeyup", findValue(onkeyupAttr));
+            addParameter("onkeyup", findValue(onkeyupAttr));
         }
     }
 }

File src/java/com/opensymphony/webwork/views/jsp/ui/DoubleSelectTag.java

         super.evaluateExtraParams(stack);
 
         if (emptyOptionAttr != null) {
-            addParam("emptyOption", findValue(emptyOptionAttr, Boolean.class));
+            addParameter("emptyOption", findValue(emptyOptionAttr, Boolean.class));
         }
 
         if (multipleAttr != null) {
-            addParam("multiple", findValue(multipleAttr, Boolean.class));
+            addParameter("multiple", findValue(multipleAttr, Boolean.class));
         }
 
         if (sizeAttr != null) {
-            addParam("size", findValue(sizeAttr, String.class));
+            addParameter("size", findValue(sizeAttr, String.class));
         }
 
         if ((headerKeyAttr != null) && (headerValueAttr != null)) {
-            addParam("headerKey", findValue(headerKeyAttr, String.class));
-            addParam("headerValue", findValue(headerValueAttr, String.class));
+            addParameter("headerKey", findValue(headerKeyAttr, String.class));
+            addParameter("headerValue", findValue(headerValueAttr, String.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/FileTag.java

         super.evaluateParams(stack);
 
         if (acceptAttr != null) {
-            addParam("accept", findValue(acceptAttr, String.class));
+            addParameter("accept", findValue(acceptAttr, String.class));
         }
 
         if (sizeAttr != null) {
-            addParam("size", findValue(sizeAttr, String.class));
+            addParameter("size", findValue(sizeAttr, String.class));
         }
     }
 }

File src/java/com/opensymphony/webwork/views/jsp/ui/FormTag.java

 
             if (actionObj != null) {
                 String result = UrlHelper.buildUrl(actionObj.toString(), request, response, null);
-                addParam("action", result);
+                addParameter("action", result);
             }
         }
 
         if (enctypeAttr != null) {
-            addParam("enctype", findValue(enctypeAttr, String.class));
+            addParameter("enctype", findValue(enctypeAttr, String.class));
         }
 
         if (methodAttr != null) {
-            addParam("method", findValue(methodAttr, String.class));
+            addParameter("method", findValue(methodAttr, String.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/PasswordTag.java

         super.evaluateExtraParams(stack);
 
         if (showPasswordAttr != null) {
-            addParam("showPassword", findValue(showPasswordAttr, Boolean.class));
+            addParameter("showPassword", findValue(showPasswordAttr, Boolean.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/SelectTag.java

         super.evaluateExtraParams(stack);
 
         if (emptyOptionAttr != null) {
-            addParam("emptyOption", findValue(emptyOptionAttr, Boolean.class));
+            addParameter("emptyOption", findValue(emptyOptionAttr, Boolean.class));
         }
 
         if (multipleAttr != null) {
-            addParam("multiple", findValue(multipleAttr, Boolean.class));
+            addParameter("multiple", findValue(multipleAttr, Boolean.class));
         }
 
         if (sizeAttr != null) {
-            addParam("size", findValue(sizeAttr, String.class));
+            addParameter("size", findValue(sizeAttr, String.class));
         }
 
         if ((headerKeyAttr != null) && (headerValueAttr != null)) {
-            addParam("headerKey", findValue(headerKeyAttr, String.class));
-            addParam("headerValue", findValue(headerValueAttr, String.class));
+            addParameter("headerKey", findValue(headerKeyAttr, String.class));
+            addParameter("headerValue", findValue(headerValueAttr, String.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/SubmitTag.java

 
         super.evaluateParams(stack);
 
-        addParam("align", findValue(alignAttr, String.class));
+        addParameter("align", findValue(alignAttr, String.class));
     }
 }

File src/java/com/opensymphony/webwork/views/jsp/ui/TextFieldTag.java

         super.evaluateExtraParams(stack);
 
         if (sizeAttr != null) {
-            addParam("size", findValue(sizeAttr, String.class));
+            addParameter("size", findValue(sizeAttr, String.class));
         }
 
         if (maxLengthAttr != null) {
-            addParam("maxlength", findValue(maxLengthAttr, String.class));
+            addParameter("maxlength", findValue(maxLengthAttr, String.class));
         }
 
         if (readonlyAttr != null) {
-            addParam("readonly", findValue(readonlyAttr, Boolean.class));
+            addParameter("readonly", findValue(readonlyAttr, Boolean.class));
         }
 
         if (onkeyupAttr != null) {
-            addParam("onkeyup", findValue(onkeyupAttr, String.class));
+            addParameter("onkeyup", findValue(onkeyupAttr, String.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/TextTag.java

  */
 package com.opensymphony.webwork.views.jsp.ui;
 
-import com.opensymphony.webwork.views.jsp.ParameterizedTag;
 import com.opensymphony.webwork.views.jsp.WebWorkBodyTagSupport;
+import com.opensymphony.webwork.views.jsp.ParamTag;
 
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.TextProvider;
  *
  * @author Jason Carreira
  */
-public class TextTag extends WebWorkBodyTagSupport implements ParameterizedTag {
+public class TextTag extends WebWorkBodyTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     private static final Log LOG = LogFactory.getLog(TextTag.class);
         this.nameAttr = name;
     }
 
-    public Map getParams() {
+    public Map getParameters() {
         return null;
     }
 
         value3Attr = aName;
     }
 
-    public void addParam(String key, Object value) {
+    public void addParameter(String key, Object value) {
         addParam(value);
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/TextareaTag.java

         super.evaluateExtraParams(stack);
 
         if (readonlyAttr != null) {
-            addParam("readonly", findValue(readonlyAttr, Boolean.class));
+            addParameter("readonly", findValue(readonlyAttr, Boolean.class));
         }
 
         if (onkeyupAttr != null) {
-            addParam("onkeyup", findValue(onkeyupAttr, String.class));
+            addParameter("onkeyup", findValue(onkeyupAttr, String.class));
         }
 
         if (colsAttr != null) {
-            addParam("cols", findValue(colsAttr, String.class));
+            addParameter("cols", findValue(colsAttr, String.class));
         }
 
         if (rowsAttr != null) {
-            addParam("rows", findValue(rowsAttr, String.class));
+            addParameter("rows", findValue(rowsAttr, String.class));
         }
     }
 

File src/java/com/opensymphony/webwork/views/jsp/ui/TokenTag.java

             }
         }
 
-        addParam("name", tokenName);
+        addParameter("name", tokenName);
 
         String token = buildToken(tokenName);
-        addParam("token", token);
+        addParameter("token", token);
 
         return super.doEndTag();
     }

File src/java/com/opensymphony/webwork/views/jsp/ui/table/WebTable.java

 
     public void addParameter(String name, Object value) {
         OgnlUtil.setProperty(name, value, this, getStack().getContext());
-        super.addParam(name, value);
+        super.addParameter(name, value);
     }
 
     public int doEndTag() throws JspException {
         }
 
         // evaluate all the parameters for the webtable
-        Map params = getParams();
+        Map params = getParameters();
         Set set = params.keySet();
 
         for (Iterator iterator = set.iterator(); iterator.hasNext();) {

File src/java/com/opensymphony/webwork/views/jsp/vui/AbstractVUITag.java

 import com.opensymphony.webwork.config.Configuration;
 import com.opensymphony.webwork.util.ContainUtil;
 import com.opensymphony.webwork.views.jsp.IncludeTag;
-import com.opensymphony.webwork.views.jsp.ParameterizedTag;
 import com.opensymphony.webwork.views.jsp.WebWorkBodyTagSupport;
+import com.opensymphony.webwork.views.jsp.ParamTag;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
  * @author Jeff Haynie (jhaynie@vocalocity.net)
  * @version $Revision$
  */
-public abstract class AbstractVUITag extends WebWorkBodyTagSupport implements ParameterizedTag {
+public abstract class AbstractVUITag extends WebWorkBodyTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     // Attributes ----------------------------------------------------
         return ((ua == null) ? "" : ua);
     }
 
-    public Map getParams() {
+    public Map getParameters() {
         return params;
     }
 
         return theme;
     }
 
-    public void addParam(String name, Object value) {
+    public void addParameter(String name, Object value) {
         addParameterInternal(name, value);
     }
 

File src/java/com/opensymphony/webwork/views/jsp/vui/FilledTag.java

         String url = ((actionAttr != null) ? UrlHelper.buildUrl((String) findValue(actionAttr), request, response, null) : null);
 
         if (url != null) {
-            addParam("action", url);
+            addParameter("action", url);
             url = ((actionaudioAttr != null) ? UrlHelper.buildUrl((String) findValue(actionaudioAttr), request, response, null) : null);
 
             if (url != null) {
-                addParam("actionaudio", url);
+                addParameter("actionaudio", url);
             }
         }
 

File src/java/com/opensymphony/webwork/views/velocity/AbstractTagDirective.java

 
 import com.opensymphony.webwork.ServletActionContext;
 import com.opensymphony.webwork.config.Configuration;
-import com.opensymphony.webwork.views.jsp.ParameterizedTag;
+import com.opensymphony.webwork.views.jsp.ParamTag;
 
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.util.OgnlUtil;
 import com.opensymphony.xwork.util.OgnlValueStack;
-import com.opensymphony.xwork.util.XWorkConverter;
 
 import ognl.Ognl;
-import ognl.OgnlContext;
-import ognl.OgnlException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
             InternalContextAdapter subContextAdapter = new WrappedInternalContextAdapter(contextAdapter);
 
             // populate our tag with all the user specified properties
-            if (object instanceof ParameterizedTag) {
-                Map params = ((ParameterizedTag) object).getParams();
+            if (object instanceof ParamTag.Parametric) {
+                Map params = ((ParamTag.Parametric) object).getParameters();
                 if (params != null) {
                     params.clear();
                 }
 
         try {
             Map paramMap = null;
-            ParameterizedTag parameterizedTag = null;
+            ParamTag.Parametric parameterizedTag = null;
 
-            if (tag instanceof ParameterizedTag) {
-                parameterizedTag = (ParameterizedTag) tag;
-                paramMap = parameterizedTag.getParams();
+            if (tag instanceof ParamTag.Parametric) {
+                parameterizedTag = (ParamTag.Parametric) tag;
+                paramMap = parameterizedTag.getParameters();
             }
 
             int result = tag.doStartTag();
 
             if (paramMap != null) {
-                parameterizedTag.getParams().putAll(paramMap);
+                parameterizedTag.getParameters().putAll(paramMap);
             }
 
             if (result != Tag.SKIP_BODY) {
             String key = entry.getKey().toString();
             Object value = entry.getValue();
 
-            if (object instanceof ParameterizedTag && key.startsWith("params.")) {
+            if (object instanceof ParamTag.Parametric && key.startsWith("params.")) {
                 value = stack.findValue(value.toString());
             }
 

File src/java/com/opensymphony/webwork/views/velocity/ParamDirective.java

  */
 package com.opensymphony.webwork.views.velocity;
 
-import com.opensymphony.webwork.views.jsp.ParameterizedTag;
+import com.opensymphony.webwork.views.jsp.ParamTag;
 
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.util.OgnlValueStack;
     public boolean render(InternalContextAdapter contextAdapter, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
         Object object = contextAdapter.get(VelocityManager.TAG);
 
-        if ((object != null) && (object instanceof ParameterizedTag)) {
+        if ((object != null) && (object instanceof ParamTag.Parametric)) {
             if ((node.jjtGetNumChildren() != 2) && (node.jjtGetNumChildren() != 3)) {
                 throw new ParseErrorException("#param directive requires two parameters, a key and a value.  an optional flag to evaluate it may be included.");
             }
                 value = valueStack.findValue(value.toString());
             }
 
-            ParameterizedTag parameterizedTag = (ParameterizedTag) object;
+            ParamTag.Parametric parameterizedTag = (ParamTag.Parametric) object;
 
             if (key != null) {
-                parameterizedTag.addParam(key.toString(), value);
+                parameterizedTag.addParameter(key.toString(), value);
             }
 
             return true;

File src/migration/webwork/dispatcher/DynamicViewMapping.java

             }
             return params;
         } catch (NoSuchElementException nse) {
-            log.warn("getParams: " + parameterString + ", caught NoSuchElementException: ", nse);
+            log.warn("getParameters: " + parameterString + ", caught NoSuchElementException: ", nse);
             return Collections.EMPTY_MAP;
         } catch (Exception e) {
-            log.warn("getParams: " + parameterString + ", caught Exception: ", e);
+            log.warn("getParameters: " + parameterString + ", caught Exception: ", e);
             return Collections.EMPTY_MAP;
         }
     }

File src/test/com/opensymphony/webwork/views/jsp/ActionTagTest.java

 
         try {
             tag.doStartTag();
-            tag.addParam("foo", "myFoo");
+            tag.addParameter("foo", "myFoo");
             tag.doEndTag();
 
             assertEquals("myFoo", stack.findValue("#testAction.foo"));

File src/test/com/opensymphony/webwork/views/jsp/BeanTagTest.java

 
         try {
             tag.doStartTag();
-            tag.addParam("'result'", "success");
+            tag.addParameter("'result'", "success");
 
             assertEquals("success", stack.findValue("result"));
             assertEquals(2, stack.size());

File src/test/com/opensymphony/webwork/views/jsp/URLTagTest.java

 
         try {
             tag.doStartTag();
-            tag.addParam("param1", "value1");
-            tag.addParam("param2", "value2");
+            tag.addParameter("param1", "value1");
+            tag.addParameter("param2", "value2");
             tag.doEndTag();
         } catch (JspException ex) {
             ex.printStackTrace();

File src/test/com/opensymphony/webwork/views/jsp/ui/ComponentTest.java

         tag.setTemplate("/com/opensymphony/webwork/views/jsp/ui/Component.vm");
 
         tag.doStartTag();
-        tag.addParam("hello", "world");
-        tag.addParam("argle", "bargle");
-        tag.addParam("glip", "glop");
-        tag.addParam("array", new String[] {"a", "b", "c"});
-        tag.addParam("obj", tag);
+        tag.addParameter("hello", "world");
+        tag.addParameter("argle", "bargle");
+        tag.addParameter("glip", "glop");
+        tag.addParameter("array", new String[] {"a", "b", "c"});
+        tag.addParameter("obj", tag);
 
         int result = tag.doEndTag();
 

File src/test/com/opensymphony/webwork/views/velocity/TagDirectiveTest.java

         template.merge(context, writer);
 
         // verify that we got one param, hello=world
-        Map params = mockTag.getParams();
+        Map params = mockTag.getParameters();
         Assert.assertNotNull(params);
         Assert.assertEquals(2, params.size());
         Assert.assertTrue(params.containsKey("hello"));

File src/test/com/opensymphony/webwork/views/velocity/ui/MockTag.java

  */
 package com.opensymphony.webwork.views.velocity.ui;
 
-import com.opensymphony.webwork.views.jsp.ParameterizedTag;
+import com.opensymphony.webwork.views.jsp.ParamTag;
 
 import java.util.Calendar;
 import java.util.Date;
  * Date: May 31, 2003
  * Time: 10:21:36 AM
  */
-public class MockTag extends BodyTagSupport implements ParameterizedTag {
+public class MockTag extends BodyTagSupport implements ParamTag.Parametric {
     //~ Static fields/initializers /////////////////////////////////////////////
 
     private static String s;
         return l;
     }
 
-    public Map getParams() {
+    public Map getParameters() {
         return this.params;
     }
 
         return s;
     }
 
-    public void addParam(String key, Object value) {
+    public void addParameter(String key, Object value) {
         this.params.put(key, value);
     }