mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-1538 Clarify storeErrorsAcrossRequestExample
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@490057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user