chubi wrote:
Thank you Dave for helping,
Below is the fragment in struts.xml where editLicense should submit to
saveLicense, which in return should redirect to editLicense again. That is
the call to saveLicense is transparent.
Submit to saveLicense was intercepted by validation. Errors were found!
What happens next? How do I preserve the error stack?
Thank you for support.
pst: I am using struts2/spring/hibernate.
<action name="editLicense" class="orgAdminLicenseAction" method="edit">
<result>/WEB-INF/pages/lms/orgAdmin/licenseForm.jsp</result>
<result
name="error">/WEB-INF/pages/lms/orgAdmin/licenseList.jsp</result>
</action>
<action name="saveLicense" class="orgAdminLicenseAction" method="save">
<result name="success" type="redirect">licenses.html</result>
<result name="cancel" type="redirect">licenses.html</result>
<result name="delete" type="redirect">licenses.html</result>
<result name="input" type="redirect-action">
editLicense.html
true
${license.dkey}
</result>
</action>
Validation error messages are stored in request scope, so a redirect
loses them. Adding the Message Store interceptor to the saveLicense
action can solve that problem for you, but you'll need to tweak the
interceptor stack for editLicense too so that the workflow interceptor
doesn't try to react to the error messages coming from saveLicense.
L.
[1] http://struts.apache.org/2.0.11/docs/message-store-interceptor.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]