You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/12/24 19:46:36 UTC
svn commit: r490057 - in
/struts/struts2/trunk/apps/showcase/src/main/webapp/validation: index.jsp
storeErrorsAcrossRequestExample.jsp
Author: husted
Date: Sun Dec 24 10:46:35 2006
New Revision: 490057
URL: http://svn.apache.org/viewvc?view=rev&rev=490057
Log:
WW-1538 Clarify storeErrorsAcrossRequestExample
Modified:
struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp?view=diff&rev=490057&r1=490056&r2=490057
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/validation/index.jsp Sun Dec 24 10:46:35 2006
@@ -34,8 +34,8 @@
<li><s:a href="%{nonFieldValidatorUrl}">Non Field Validator</s:a></li>
<li><s:a href="%{visitorValidatorUrl}">Visitor Validator</s:a></li>
<li><s:a href="%{clientSideValidationUrl}">Client side validation using JavaScript</s:a></li>
- <li><s:a href="%{backToShowcase}">Back To Showcase</s:a>
<li><s:a href="%{storeMessageAcrossRequestExample}">Store across request using MessageStoreInterceptor (Example)</s:a></li>
+ <li><s:a href="%{backToShowcase}">Back To Showcase</s:a>
</ul>
</body>
</html>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp?view=diff&rev=490057&r1=490056&r2=490057
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/validation/storeErrorsAcrossRequestExample.jsp Sun Dec 24 10:46:35 2006
@@ -17,18 +17,27 @@
configured, the action errors / messages / field errors will be store and
remains retrieveable even after a redirect.
</p>
- <p/>
-
- <s:actionmessage/>
- <s:actionerror/>
- <s:fielderror />
- <s:form action="submitApplication" namespace="/validation">
+ <table border="1">
+ <tr><td>ActionMessages: </td><td></td><s:actionmessage/></tr>
+ <tr><td>ActionErrors: </td><td><s:actionerror/></td></tr>
+ </table>
+
+ <p>
+ <s:form action="submitApplication" namespace="/validation">
<s:textfield name="name" label="Name" />
<s:textfield name="age" label="Age" />
<s:submit />
<s:submit action="cancelApplication" value="%{'Cancel'}" />
</s:form>
+ </p>
+ <p>
+ Try submitting with an invalid age value,
+ and note that the browser location changes,
+ but validation messages are retained.
+ Because of the redirect,
+ the input values are not retained.
+ </p>
</body>
</html>