Author: germuska
Date: Wed Dec 15 07:22:22 2004
New Revision: 111974

URL: http://svn.apache.org/viewcvs?view=rev&rev=111974
Log:
correct error using 'name' attr instead of 'property' for action/set-property; 
update javadoc to reflect simpler implementation than originally planned
Modified:
   struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java

Modified: 
struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java
Url: 
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java?view=diff&rev=111974&p1=struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java&r1=111973&p2=struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java&r2=111974
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java     
(original)
+++ struts/core/trunk/src/share/org/apache/struts/config/ConfigRuleSet.java     
Wed Dec 15 07:22:22 2004
@@ -296,19 +296,19 @@
 }
 
 /**
- * A variant of the standard Digester <code>SetPropertyRule</code> which
- * accepts one of two "naming" attributes.  If the element being processed
- * has an attribute whose name matches <code>nameAttrName</code>, then the 
- * standard <code>SetPropertyRule</code> behavior is invoked, and the value 
will
+ * A variant of the standard Digester <code>SetPropertyRule</code>.  If the 
element 
+ * being processed has a "key" attribute, then the value will be used to call 
+ * <code>setProperty(key,value)</code> on the object on top of the stack, 
which 
+ * will be assumed to be of type <code>ActionConfig</code>.  Otherwise, the 
standard 
+ * <code>SetPropertyRule</code> behavior is invoked, and the value will
  * be used to set a bean property on the object on top of the Digester stack.  
- * However, if there is an attribute whose name matches 
<code>keyAttrName</code>,
- * then the value will be used to call <code>setProperty(key,value)</code> on 
the object
- * on top of the stack, which will be assumed to be of type 
<code>ActionConfig</code>.
+ * In that case, the element being processed is assumed to have attributes
+ * "property" and "value".
  */
 final class ActionConfigSetPropertyRule extends SetPropertyRule {
 
     public ActionConfigSetPropertyRule() {
-        super("name", "value");
+        super("property", "value");
     }
 
     public void begin(Attributes attributes) throws Exception {
@@ -318,8 +318,8 @@
             return;
         }
 
-        if (attributes.getIndex("name") != -1) {
-            throw new IllegalArgumentException("<set-property> inside <action> 
accepts only one of 'key' or 'name' attributes.");
+        if (attributes.getIndex("property") != -1) {
+            throw new IllegalArgumentException("<set-property> inside <action> 
accepts only one of 'key' or 'property' attributes.");
         }
 
         ActionConfig actionConfig = (ActionConfig) digester.peek();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to