Modified: 
struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl 
Sat Aug 19 15:03:04 2006
@@ -16,7 +16,7 @@
         <#if parameters.timeIconPath?exists>
             iconPath="${parameters.timeIconPath}"
         <#else>
-               iconPath="<@saf.url includeParams='none' 
value='/struts/dojo/struts/widgets/timeIcon.gif' encode='false' 
includeParams="none" />"
+               iconPath="<@s.url includeParams='none' 
value='/struts/dojo/struts/widgets/timeIcon.gif' encode='false' 
includeParams="none" />"
         </#if>
         <#if parameters.templatePath?exists>
             templatePath="${parameters.templatePath}"
Modified: 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl 
(original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/simple/updownselect.ftl 
Sat Aug 19 15:03:04 2006
@@ -1,5 +1,5 @@
 <#if !stack.findValue("#optiontransferselect_js_included")?exists><#t/>
-       <script language="javascript" src="<@saf.url 
value="/struts/optiontransferselect.js" encode='false' />"></script>
+       <script language="javascript" src="<@s.url 
value="/struts/optiontransferselect.js" encode='false' />"></script>
        <#assign temporaryVariable = 
stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
 </#if><#t/>
 <table>

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl 
Sat Aug 19 15:03:04 2006
@@ -66,7 +66,7 @@
 </#if>
 :<#t/>
 <#if parameters.tooltip?exists>
-    <img src='<@saf.url value="/struts/tooltip/tooltip.gif" />' 
alt="${parameters.tooltip}" title="${parameters.tooltip}" onmouseover="return 
escape('${parameters.tooltip?js_string}');" />
+    <img src='<@s.url value="/struts/tooltip/tooltip.gif" />' 
alt="${parameters.tooltip}" title="${parameters.tooltip}" onmouseover="return 
escape('${parameters.tooltip?js_string}');" />
 </#if>
 </label><#t/>
 </#if>
@@ -76,7 +76,7 @@
         <span class="required">*</span><#t/>
     </#if>
     <#if parameters.tooltip?exists>
-        <img src='<@saf.url value="/struts/tooltip/tooltip.gif" />' 
alt="${parameters.tooltip}" title="${parameters.tooltip}" onmouseover="return 
escape('${parameters.tooltip?js_string}');" />
+        <img src='<@s.url value="/struts/tooltip/tooltip.gif" />' 
alt="${parameters.tooltip}" title="${parameters.tooltip}" onmouseover="return 
escape('${parameters.tooltip?js_string}');" />
     </#if>
 </#if>
     </td>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/head.ftl Sat 
Aug 19 15:03:04 2006
@@ -1,2 +1,2 @@
-<link rel="stylesheet" href="<@saf.url value='/struts/xhtml/styles.css' 
includeParams="none" encode='false' />" type="text/css"/>
+<link rel="stylesheet" href="<@s.url value='/struts/xhtml/styles.css' 
includeParams="none" encode='false' />" type="text/css"/>
 <#include "/${parameters.templateDir}/simple/head.ftl" />

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl 
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/tooltip.ftl Sat 
Aug 19 15:03:04 2006
@@ -2,9 +2,9 @@
          <#assign tooltipHashCode=parameters.tooltip.hashCode() />
       <img id="_tt${tooltipHashCode?string('#')}"
       <#if parameters.tooltipIcon?exists><#t/>
-       src='<@saf.url value="${parameters.tooltipIcon}" />' 
+       src='<@s.url value="${parameters.tooltipIcon}" />'
       <#else><#t/>
-       src='<@saf.url value="/struts/dojo/struts/tooltip.gif" />'
+       src='<@s.url value="/struts/dojo/struts/tooltip.gif" />'
       </#if><#t/>
        alt="${parameters.tooltip?html}" 
        title="${parameters.tooltip?html}" />

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
 Sat Aug 19 15:03:04 2006
@@ -378,8 +378,8 @@
     }
     
     public void testGetUriFromActionMapper12() throws Exception {
-        String old = 
org.apache.struts2.config.Settings.get(StrutsConstants.STRUTS_COMPATIBILITY_MODE);
-        
org.apache.struts2.config.Settings.set(StrutsConstants.STRUTS_COMPATIBILITY_MODE,
 "true");
+        String old = 
org.apache.struts2.config.Settings.get(StrutsConstants.STRUTS_COMPATIBILITY_MODE_WEBWORK);
+        
org.apache.struts2.config.Settings.set(StrutsConstants.STRUTS_COMPATIBILITY_MODE_WEBWORK,
 "true");
         try {
             DefaultActionMapper mapper = new DefaultActionMapper();
             ActionMapping actionMapping = new ActionMapping();
@@ -390,7 +390,7 @@
             assertEquals("/myActionName.action", uri);
         }
         finally {
-            
org.apache.struts2.config.Settings.set(StrutsConstants.STRUTS_COMPATIBILITY_MODE,
 old);
+            
org.apache.struts2.config.Settings.set(StrutsConstants.STRUTS_COMPATIBILITY_MODE_WEBWORK,
 old);
         }
     }
 

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ElseTagTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ElseTagTest.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ElseTagTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ElseTagTest.java
 Sat Aug 19 15:03:04 2006
@@ -93,7 +93,7 @@
         // create the mock http servlet request
         StrutsMockHttpServletRequest request = new 
StrutsMockHttpServletRequest();
         
-        // NOTE: in WW Tag library, TagUtil gets stack from request, which 
will be set
+        // NOTE: in Struts Tag library, TagUtil gets stack from request, which 
will be set
         //       when request going through the FilterDispatcher --> 
DispatcherUtil etc. route
         request.setAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY, 
stack);
 

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java
 Sat Aug 19 15:03:04 2006
@@ -62,7 +62,7 @@
     public void testDefaultMessageOk() throws Exception {
        // NOTE:
        // simulate the condition
-       // <saf:text name="some.invalid.key">My Default Message</saf:text>
+       // <s:text name="some.invalid.key">My Default Message</s:text>
        
        StrutsMockBodyContent mockBodyContent = new StrutsMockBodyContent(new 
MockJspWriter());
        mockBodyContent.setString("Sample Of Default Message");

Modified: 
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/tutorial/sitegraph/guess-input.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/tutorial/sitegraph/guess-input.ftl?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- 
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/tutorial/sitegraph/guess-input.ftl
 (original)
+++ 
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/sitegraph/tutorial/sitegraph/guess-input.ftl
 Sat Aug 19 15:03:04 2006
@@ -4,9 +4,9 @@
 </head>
 
 <body>
-<@ww.form action="guess" method="post">
-    <@ww.textfield label="Guess a number" name="guess"/>
-    <@ww.submit value="Guess"/>
-</@ww.form>
+<@s.form action="guess" method="post">
+    <@s.textfield label="Guess a number" name="guess"/>
+    <@s.submit value="Guess"/>
+</@s.form>
 </body>
 </html>

Modified: struts/struts2/trunk/docs/tags/GenericUIBean.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/docs/tags/GenericUIBean.html?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/docs/tags/GenericUIBean.html (original)
+++ struts/struts2/trunk/docs/tags/GenericUIBean.html Sat Aug 19 15:03:04 2006
@@ -16,7 +16,7 @@
 </p>
 
 <p>
-<!-- START SNIPPET: javadoc --> Renders an custom UI widget using the 
specified templates. Additional objects can be passed in to the template using 
the param tags.<p/> <b>Freemarker:</b><p/> Objects provided can be retrieve 
from within the template via $parameters._paramname_.<p/> <b>Jsp:</b><p/> 
Objects provided can be retrieve from within the template via &lt;saf:property 
value="%{parameters._paramname_}" /&gt;<p/> In the bottom JSP and Velocity 
samples, two parameters are being passed in to the component. From within the 
component, they can be accessed as:- <p/> <b>Freemarker:</b><p/> 
$parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and 
$parameters.key2<p/> <b>Jsp:</b><p/> &lt;saf:property 
value="%{parameters.key1}" /&gt; and &lt;saf:property 
value="%{'parameters.key2'}" /&gt; or &lt;saf:property 
value="%{parameters.get('key1')}" /&gt; and &lt;saf:property 
value="%{parameters.get('key2')}" /&gt;<p/> Currently, your custom UI 
components can be writt
 en in Velocity, JSP, or Freemarker, and the correct rendering engine will be 
found based on file extension.<p/> <b>Remember:</b> the value params will 
always be resolved against the OgnlValueStack so if you mean to pass a string 
literal to your component, make sure to wrap it in quotes i.e. value="'value1'" 
otherwise, the the value stack will search for an Object on the stack with a 
method of getValue1(). (now that i've written this, i'm not entirely sure this 
is the case. i should verify this manana)<p/> <!-- END SNIPPET: javadoc --> 
<p/> <b>Examples</b> <pre> <!-- START SNIPPET: example --> JSP &lt;a:component 
template="/my/custom/component.vm"/&gt; or &lt;a:component 
template="/my/custom/component.vm"&gt; &lt;a:param name="key1" 
value="value1"/&gt; &lt;a:param name="key2" value="value2"/&gt; 
&lt;/a:component&gt; Velocity #safcomponent( "template=/my/custom/component.vm" 
) or #safcomponent( "template=/my/custom/component.vm" ) #safparam( "name=key1" 
"value=value1" ) #safpa
 ram( "name=key2" "value=value2" ) #end Freemarker &lt;@saf.component 
template="/my/custom/component.ftl" /> or &lt;@saf.component 
template="/my/custom/component.ftl"&gt; &lt;@saf.param name="key1" 
value="%{'value1'}" /&gt; &lt;@saf.param name="key2" value="%{'value2'}" /&gt; 
&lt;/@saf.component&gt; <!-- END SNIPPET: example --> </pre> <p/> <b>NOTE:</b> 
<!-- START SNIPPET: note --> If Jsp is used as the template, the jsp template 
itself must lie within the webapp itself and not the classpath. Unlike 
Freemarker or Velocity, JSP template could not be picked up from the classpath. 
<!-- END SNIPPET: note -->
+<!-- START SNIPPET: javadoc --> Renders an custom UI widget using the 
specified templates. Additional objects can be passed in to the template using 
the param tags.<p/> <b>Freemarker:</b><p/> Objects provided can be retrieve 
from within the template via $parameters._paramname_.<p/> <b>Jsp:</b><p/> 
Objects provided can be retrieve from within the template via &lt;s:property 
value="%{parameters._paramname_}" /&gt;<p/> In the bottom JSP and Velocity 
samples, two parameters are being passed in to the component. From within the 
component, they can be accessed as:- <p/> <b>Freemarker:</b><p/> 
$parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and 
$parameters.key2<p/> <b>Jsp:</b><p/> &lt;s:property value="%{parameters.key1}" 
/&gt; and &lt;s:property value="%{'parameters.key2'}" /&gt; or &lt;s:property 
value="%{parameters.get('key1')}" /&gt; and &lt;s:property 
value="%{parameters.get('key2')}" /&gt;<p/> Currently, your custom UI 
components can be written in Velo
 city, JSP, or Freemarker, and the correct rendering engine will be found based 
on file extension.<p/> <b>Remember:</b> the value params will always be 
resolved against the OgnlValueStack so if you mean to pass a string literal to 
your component, make sure to wrap it in quotes i.e. value="'value1'" otherwise, 
the the value stack will search for an Object on the stack with a method of 
getValue1(). (now that i've written this, i'm not entirely sure this is the 
case. i should verify this manana)<p/> <!-- END SNIPPET: javadoc --> <p/> 
<b>Examples</b> <pre> <!-- START SNIPPET: example --> JSP &lt;a:component 
template="/my/custom/component.vm"/&gt; or &lt;a:component 
template="/my/custom/component.vm"&gt; &lt;a:param name="key1" 
value="value1"/&gt; &lt;a:param name="key2" value="value2"/&gt; 
&lt;/a:component&gt; Velocity #s-component( "template=/my/custom/component.vm" 
) or #s-component( "template=/my/custom/component.vm" ) #s-param( "name=key1" 
"value=value1" ) #s-param( "name=key
 2" "value=value2" ) #end Freemarker &lt;@s.component 
template="/my/custom/component.ftl" /> or &lt;@s.component 
template="/my/custom/component.ftl"&gt; &lt;@s.param name="key1" 
value="%{'value1'}" /&gt; &lt;@s.param name="key2" value="%{'value2'}" /&gt; 
&lt;/@s.component&gt; <!-- END SNIPPET: example --> </pre> <p/> <b>NOTE:</b> 
<!-- START SNIPPET: note --> If Jsp is used as the template, the jsp template 
itself must lie within the webapp itself and not the classpath. Unlike 
Freemarker or Velocity, JSP template could not be picked up from the classpath. 
<!-- END SNIPPET: note -->
 </p>
 
 <h2>Attributes</h2>

Modified: struts/struts2/trunk/docs/tags/IteratorComponent.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/docs/tags/IteratorComponent.html?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/docs/tags/IteratorComponent.html (original)
+++ struts/struts2/trunk/docs/tags/IteratorComponent.html Sat Aug 19 15:03:04 
2006
@@ -16,7 +16,7 @@
 </p>
 
 <p>
-<!-- START SNIPPET: javadoc --> <p>Iterator will iterate over a value. An 
iterable value can be either of: java.util.Collection, java.util.Iterator, 
java.util.Enumeration, java.util.Map, array.</p> <p/> <!-- END SNIPPET: javadoc 
--> <!-- START SNIPPET: params --> <ul> <li>status (String) - if specified, an 
instanceof IteratorStatus will be pushed into stack upon each iteration</li> 
<li>value (Object) - the source to iterate over, must be iteratable, else an 
the object itself will be put into a newly created List (see 
MakeIterator#convert(Object)</li> <li>id (String) - if specified the current 
iteration object will be place with this id in Struts stack's context 
scope</li> </ul> <!-- END SNIPPET: params --> <!-- START SNIPPET: 
example1description --> <p>The following example retrieves the value of the 
getDays() method of the current object on the value stack and uses it to 
iterate over. The &lt;a:property/&gt; tag prints out the current value of the 
iterator.</p> <!-- END SNI
 PPET: example1description --> <pre> <!-- START SNIPPET: example1code --> 
&lt;a:iterator value="days"&gt; &lt;p&gt;day is: &lt;a:property/&gt;&lt;/p&gt; 
&lt;/a:iterator&gt; <!-- END SNIPPET: example1code --> </pre> <!-- START 
SNIPPET: example2description --> <p>The following example uses a [EMAIL 
PROTECTED] Bean} tag and places it into the ActionContext. The iterator tag 
will retrieve that object from the ActionContext and then calls its getDays() 
method as above. The status attribute is also used to create a [EMAIL 
PROTECTED] IteratorStatus} object, which in this example, its odd() method is 
used to alternate row colours:</p> <!-- END SNIPPET: example2description --> 
<pre> <!-- START SNIPPET: example2code --> &lt;a:bean 
name="org.apache.struts2.example.IteratorExample" id="it"&gt; &lt;a:param 
name="day" value="'foo'"/&gt; &lt;a:param name="day" value="'bar'"/&gt; 
&lt;/a:bean&gt; <p/> &lt;table border="0" cellspacing="0" cellpadding="1"&gt; 
&lt;tr&gt; &lt;th&gt;Days of the week&lt;/th&gt; &lt;/tr&
 gt; <p/> &lt;a:iterator value="#it.days" status="rowstatus"&gt; &lt;tr&gt; 
&lt;a:if test="#rowstatus.odd == true"&gt; &lt;td style="background: 
grey"&gt;&lt;a:property/&gt;&lt;/td&gt; &lt;/a:if&gt; &lt;a:else&gt; 
&lt;td&gt;&lt;a:property/&gt;&lt;/td&gt; &lt;/a:else&gt; &lt;/tr&gt; 
&lt;/a:iterator&gt; &lt;/table&gt; <!-- END SNIPPET: example2code --> </pre> 
<!--START SNIPPET: example3description --> <p> The next example will further 
demonstrate the use of the status attribute, using a DAO obtained from the 
action class through OGNL, iterating over groups and their users (in a security 
context). The last() method indicates if the current object is the last 
available in the iteration, and if not, we need to seperate the users using a 
comma: </p> <!-- END SNIPPET: example3description --> <pre> <!-- START SNIPPET: 
example3code --> &lt;saf:iterator value="groupDao.groups" 
status="groupStatus"&gt; &lt;tr class="&lt;saf:if test="#groupStatus.odd == 
true "&gt;odd&lt;/saf:if&gt;&lt;sa
 f:else&gt;even&lt;/saf:else&gt;"&gt; &lt;td&gt;&lt;saf:property value="name" 
/&gt;&lt;/td&gt; &lt;td&gt;&lt;saf:property value="description" 
/&gt;&lt;/td&gt; &lt;td&gt; &lt;saf:iterator value="users" 
status="userStatus"&gt; &lt;saf:property value="fullName" /&gt;&lt;saf:if 
test="!#userStatus.last"&gt;,&lt;/saf:if&gt; &lt;/saf:iterator&gt; &lt;/td&gt; 
&lt;/tr&gt; &lt;/saf:iterator&gt; <!-- END SNIPPET: example3code --> </pre> <p> 
<!-- START SNIPPET: example4description --> </p> The next example iterates over 
a an action collection and passes every iterator value to another action. The 
trick here lies in the use of the '[0]' operator. It takes the current iterator 
value and passes it on to the edit action. Using the '[0]' operator has the 
same effect as using &gt;a:property /&gt;. (The latter, however, does not work 
from inside the param tag). </p> <!-- END SNIPPET: example4description --> 
<pre> <!-- START SNIPPET: example4code --> &lt;a:action name="entries" 
id="entries"/&gt;
  &lt;a:iterator value="#entries.entries" &gt; &lt;a:property value="name" 
/&gt; &lt;a:property /&gt; &lt;a:push value="..."&gt; &lt;a:action name="edit" 
id="edit" &gt; &lt;a:param name="entry" value="[0]" /&gt; &lt;/a:action&gt; 
&lt;/push&gt; &lt;/a:iterator&gt; <!-- END SNIPPET: example4code --> </pre> 
<!-- START SNIPPET: example5description --> </p>To simulate a simple loop with 
iterator tag, the following could be done. It does the loop 5 times. <!-- END 
SNIPPET: example5description --> <pre> <!-- START SNIPPET: example5code --> 
&lt;a:iterator status="stat" value="{1,2,3,4,5}" &gt; &lt;!-- grab the index 
(start with 0 ... ) --&gt; &lt;a:property value="#stat.index" /&gt; &lt;!-- 
grab the top of the stack which should be the --&gt; &lt;!-- current iteration 
value (0, 1, ... 5) --&gt; &lt;a:property value="top" /&gt; &lt;/a:iterator&gt; 
<!-- END SNIPPET: example5code --> </pre>
+<!-- START SNIPPET: javadoc --> <p>Iterator will iterate over a value. An 
iterable value can be either of: java.util.Collection, java.util.Iterator, 
java.util.Enumeration, java.util.Map, array.</p> <p/> <!-- END SNIPPET: javadoc 
--> <!-- START SNIPPET: params --> <ul> <li>status (String) - if specified, an 
instanceof IteratorStatus will be pushed into stack upon each iteration</li> 
<li>value (Object) - the source to iterate over, must be iteratable, else an 
the object itself will be put into a newly created List (see 
MakeIterator#convert(Object)</li> <li>id (String) - if specified the current 
iteration object will be place with this id in Struts stack's context 
scope</li> </ul> <!-- END SNIPPET: params --> <!-- START SNIPPET: 
example1description --> <p>The following example retrieves the value of the 
getDays() method of the current object on the value stack and uses it to 
iterate over. The &lt;a:property/&gt; tag prints out the current value of the 
iterator.</p> <!-- END SNI
 PPET: example1description --> <pre> <!-- START SNIPPET: example1code --> 
&lt;a:iterator value="days"&gt; &lt;p&gt;day is: &lt;a:property/&gt;&lt;/p&gt; 
&lt;/a:iterator&gt; <!-- END SNIPPET: example1code --> </pre> <!-- START 
SNIPPET: example2description --> <p>The following example uses a [EMAIL 
PROTECTED] Bean} tag and places it into the ActionContext. The iterator tag 
will retrieve that object from the ActionContext and then calls its getDays() 
method as above. The status attribute is also used to create a [EMAIL 
PROTECTED] IteratorStatus} object, which in this example, its odd() method is 
used to alternate row colours:</p> <!-- END SNIPPET: example2description --> 
<pre> <!-- START SNIPPET: example2code --> &lt;a:bean 
name="org.apache.struts2.example.IteratorExample" id="it"&gt; &lt;a:param 
name="day" value="'foo'"/&gt; &lt;a:param name="day" value="'bar'"/&gt; 
&lt;/a:bean&gt; <p/> &lt;table border="0" cellspacing="0" cellpadding="1"&gt; 
&lt;tr&gt; &lt;th&gt;Days of the week&lt;/th&gt; &lt;/tr&
 gt; <p/> &lt;a:iterator value="#it.days" status="rowstatus"&gt; &lt;tr&gt; 
&lt;a:if test="#rowstatus.odd == true"&gt; &lt;td style="background: 
grey"&gt;&lt;a:property/&gt;&lt;/td&gt; &lt;/a:if&gt; &lt;a:else&gt; 
&lt;td&gt;&lt;a:property/&gt;&lt;/td&gt; &lt;/a:else&gt; &lt;/tr&gt; 
&lt;/a:iterator&gt; &lt;/table&gt; <!-- END SNIPPET: example2code --> </pre> 
<!--START SNIPPET: example3description --> <p> The next example will further 
demonstrate the use of the status attribute, using a DAO obtained from the 
action class through OGNL, iterating over groups and their users (in a security 
context). The last() method indicates if the current object is the last 
available in the iteration, and if not, we need to seperate the users using a 
comma: </p> <!-- END SNIPPET: example3description --> <pre> <!-- START SNIPPET: 
example3code --> &lt;s:iterator value="groupDao.groups" 
status="groupStatus"&gt; &lt;tr class="&lt;s:if test="#groupStatus.odd == true 
"&gt;odd&lt;/s:if&gt;&lt;s:else&g
 t;even&lt;/s:else&gt;"&gt; &lt;td&gt;&lt;s:property value="name" 
/&gt;&lt;/td&gt; &lt;td&gt;&lt;s:property value="description" /&gt;&lt;/td&gt; 
&lt;td&gt; &lt;s:iterator value="users" status="userStatus"&gt; &lt;s:property 
value="fullName" /&gt;&lt;s:if test="!#userStatus.last"&gt;,&lt;/s:if&gt; 
&lt;/s:iterator&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/s:iterator&gt; <!-- END 
SNIPPET: example3code --> </pre> <p> <!-- START SNIPPET: example4description 
--> </p> The next example iterates over a an action collection and passes every 
iterator value to another action. The trick here lies in the use of the '[0]' 
operator. It takes the current iterator value and passes it on to the edit 
action. Using the '[0]' operator has the same effect as using &gt;a:property 
/&gt;. (The latter, however, does not work from inside the param tag). </p> 
<!-- END SNIPPET: example4description --> <pre> <!-- START SNIPPET: 
example4code --> &lt;a:action name="entries" id="entries"/&gt; &lt;a:iterator 
value="#en
 tries.entries" &gt; &lt;a:property value="name" /&gt; &lt;a:property /&gt; 
&lt;a:push value="..."&gt; &lt;a:action name="edit" id="edit" &gt; &lt;a:param 
name="entry" value="[0]" /&gt; &lt;/a:action&gt; &lt;/push&gt; 
&lt;/a:iterator&gt; <!-- END SNIPPET: example4code --> </pre> <!-- START 
SNIPPET: example5description --> </p>To simulate a simple loop with iterator 
tag, the following could be done. It does the loop 5 times. <!-- END SNIPPET: 
example5description --> <pre> <!-- START SNIPPET: example5code --> 
&lt;a:iterator status="stat" value="{1,2,3,4,5}" &gt; &lt;!-- grab the index 
(start with 0 ... ) --&gt; &lt;a:property value="#stat.index" /&gt; &lt;!-- 
grab the top of the stack which should be the --&gt; &lt;!-- current iteration 
value (0, 1, ... 5) --&gt; &lt;a:property value="top" /&gt; &lt;/a:iterator&gt; 
<!-- END SNIPPET: example5code --> </pre>
 </p>
 
 <h2>Attributes</h2>

Modified: struts/struts2/trunk/docs/tags/Tree.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/docs/tags/Tree.html?rev=432886&r1=432885&r2=432886&view=diff
==============================================================================
--- struts/struts2/trunk/docs/tags/Tree.html (original)
+++ struts/struts2/trunk/docs/tags/Tree.html Sat Aug 19 15:03:04 2006
@@ -16,7 +16,7 @@
 </p>
 
 <p>
-<!-- START SNIPPET: javadoc --> Renders a tree widget with AJAX support.<p/> 
The id attribute is normally specified, such that it could be looked up using 
javascript if necessary.<p/> <!-- END SNIPPET: javadoc --> <p/> <b>Examples</b> 
<pre> <!-- START SNIPPET: example --> &lt-- statically --&gt; &lt;saf:tree 
id="..." label="..."&gt; &lt;saf:treenode id="..." label="..." /&gt; 
&lt;saf:treenode id="..." label="..."&gt; &lt;saf:treenode id="..." label="..." 
/&gt; &lt;saf:treenode id="..." label="..." /&gt; &;lt;/saf:treenode&gt; 
&lt;saf:treenode id="..." label="..." /&gt; &lt;/saf:tree&gt; &lt;-- 
dynamically --&gt; &lt;saf:tree id="..." rootNode="..." nodeIdProperty="..." 
nodeTitleProperty="..." childCollectionProperty="..." /&gt; <!-- END SNIPPET: 
example --> </pre>
+<!-- START SNIPPET: javadoc --> Renders a tree widget with AJAX support.<p/> 
The id attribute is normally specified, such that it could be looked up using 
javascript if necessary.<p/> <!-- END SNIPPET: javadoc --> <p/> <b>Examples</b> 
<pre> <!-- START SNIPPET: example --> &lt-- statically --&gt; &lt;s:tree 
id="..." label="..."&gt; &lt;s:treenode id="..." label="..." /&gt; 
&lt;s:treenode id="..." label="..."&gt; &lt;s:treenode id="..." label="..." 
/&gt; &lt;s:treenode id="..." label="..." /&gt; &lt;/s:treenode&gt; 
&lt;s:treenode id="..." label="..." /&gt; &lt;/s:tree&gt; &lt;-- dynamically 
--&gt; &lt;s:tree id="..." rootNode="..." nodeIdProperty="..." 
nodeTitleProperty="..." childCollectionProperty="..." /&gt; <!-- END SNIPPET: 
example --> </pre>
 </p>
 
 <h2>Attributes</h2>


Reply via email to