Commits

Anonymous committed d2df651

* param's name attribute is not required
* LabelTag now works off of value OR name -- value makes more sense, but name is for compability

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

Comments (0)

Files changed (2)

         </info>
         <attribute>
             <name>name</name>
-            <required>true</required>
+            <required>false</required>
             <rtexprvalue>true</rtexprvalue>
         </attribute>
         <attribute>

src/java/com/opensymphony/webwork/views/jsp/ui/LabelTag.java

  */
 package com.opensymphony.webwork.views.jsp.ui;
 
+import com.opensymphony.xwork.util.OgnlValueStack;
+
 
 /**
  * @version $Id$
     protected String getDefaultTemplate() {
         return TEMPLATE;
     }
+
+    protected void evaluateExtraParams(OgnlValueStack stack) {
+        super.evaluateExtraParams(stack);
+
+        // try value first, then name (this overrides the default behavior in the superclass)
+        if (valueAttr != null) {
+            addParameter("nameValue", findValue(valueAttr, String.class));
+        } else if (nameAttr != null) {
+            addParameter("nameValue", findValue(nameAttr, String.class));
+        }
+    }
 }