Author: tmjee
Date: Fri Jun  9 05:13:52 2006
New Revision: 413024

URL: http://svn.apache.org/viewvc?rev=413024&view=rev
Log:
- added xwork-conversion.xml, uncommented the block xwork.xml 
- improved conversion example, such that a series of text field is
  generated dynamically rather that statically like previously 
- added conversion example link to showcase.jsp





Modified:
    struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml
    
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp
    
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp
    struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml?rev=413024&r1=413023&r2=413024&view=diff
==============================================================================
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml 
(original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/WEB-INF/classes/xwork.xml 
Fri Jun  9 05:13:52 2006
@@ -36,9 +36,7 @@
     
     <include file="xwork-filedownload.xml" />
     
-       <!--
     <include file="xwork-conversion.xml" />
-               -->
     
     <include file="xwork-freemarker.xml" />
 

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp?rev=413024&r1=413023&r2=413024&view=diff
==============================================================================
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/enterPersonInfo.jsp
 Fri Jun  9 05:13:52 2006
@@ -21,7 +21,22 @@
 <saf:fielderror />
 
 <saf:form action="submitPersonInfo" namespace="/conversion" method="post">
+       <%--
+               The following is done Dynamically
+       --%>
+       <saf:iterator value="new int[3]" status="stat">
+               <saf:textfield  label="%{'Person '+#stat.index+' Name'}" 
+                                               
name="%{'persons['+#stat.index+'].name'}" />
+               <saf:textfield  label="%{'Person '+#stat.index+' Age'}" 
+                                               
name="%{'persons['+#stat.index+'].age'}" />
+       </saf:iterator>
        
+       
+       
+       <%--
+       The following is done statically:-
+       --%>
+       <%-- 
        <saf:textfield  label="Person 1 Name" 
                                        name="persons[0].name" />
        <saf:textfield  label="Person 1 Age"
@@ -34,8 +49,7 @@
                                        name="persons[2].name" />
        <saf:textfield  label="Person 3 Age"
                                        name="persons[2].age" />
-                                       
-                                       
+       --%>                            
                                        
        <saf:submit />
 </saf:form>

Modified: 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp?rev=413024&r1=413023&r2=413024&view=diff
==============================================================================
--- 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp
 (original)
+++ 
struts/action2/trunk/apps/showcase/src/main/webapp/conversion/showPersonInfo.jsp
 Fri Jun  9 05:13:52 2006
@@ -8,8 +8,8 @@
 <body>
 
 <saf:iterator value="persons" status="status">
-       <saf:label label="%{#status.index+' Name'}" value="%{name}" /><br/>
-       <saf:label label="%{#status.index+' Age'}" value="%{age}" /><br/>
+       <saf:label label="%{'SET '+#status.index+' Name'}" value="%{name}" 
/><br/>
+       <saf:label label="%{'SET '+#status.index+' Age'}" value="%{age}" /><br/>
 </saf:iterator>
 
 </body>

Modified: struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp
URL: 
http://svn.apache.org/viewvc/struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp?rev=413024&r1=413023&r2=413024&view=diff
==============================================================================
--- struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp (original)
+++ struts/action2/trunk/apps/showcase/src/main/webapp/showcase.jsp Fri Jun  9 
05:13:52 2006
@@ -57,6 +57,9 @@
         <!-- model-driven -->
         <li><saf:url id="url" action="modelDriven" namespace="/modelDriven" 
method="input"/><saf:a href="%{url}">Model Driven Example</saf:a>
         
+        <!-- conversion -->
+        <li><saf:url id="url" value="/conversion" /><saf:a 
href="%{url}">Conversion Example</saf:a></li>
+        
         <!--  freemarker -->
         <li><saf:url id="url" value="/freemarker" /><saf:a 
href="%{#url}">Freemarker Example</saf:a></li>
     </ul>


Reply via email to