struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r404790 - /incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java
Date Sun, 07 May 2006 16:25:25 GMT
Author: tmjee
Date: Sun May  7 09:25:19 2006
New Revision: 404790

URL: http://svn.apache.org/viewcvs?rev=404790&view=rev
Log:
ww-796

- set tag with no scope specified (which defaults to action scope) will
  now store the value under the name as its key in both action and page
  context now.


Modified:
    incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java

Modified: incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java
URL: http://svn.apache.org/viewcvs/incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java?rev=404790&r1=404789&r2=404790&view=diff
==============================================================================
--- incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java (original)
+++ incubator/webwork2/core/src/main/java/org/apache/struts/action2/components/Set.java Sun
May  7 09:25:19 2006
@@ -27,6 +27,18 @@
  * complex expression and then simply reference that variable each time rather than the complex
expression. This is
  * useful in both cases: when the complex expression takes time (performance improvement)
or is hard to read (code
  * readability improvement).</P>
+ * 
+ * The scopes available are as follows :-
+ * <ul>
+ *   <li>application - the value will be set in application scope according to servlet
spec. using the name as its key</li>
+ *   <li>session - the value will be set in session scope according to servlet spec.
using the name as key </li>
+ *   <li>request - the value will be set in request scope according to servlet spec.
using the name as key </li>
+ *   <li>page - the value will be set in request scope according to servlet sepc. using
the name as key</li>
+ *   <li>action - the value will be set in the request scope and SAF's action context
using the name as key</li>
+ * </ul>
+ * 
+ * NOTE:<p/>
+ * If no scope is specified, it will default to action scope.
  *
  * <!-- END SNIPPET: javadoc -->
  *
@@ -98,6 +110,7 @@
             stack.setValue("#attr['" + name + "']", o, false);
         } else {
             stack.getContext().put(name, o);
+            stack.setValue("#attr['" + name + "']", o, false);
         }
 
         return super.end(writer, body);



Mime
View raw message