I have 2 actions. First to display form and another to process form. If processAdd action is not validated than redirectAction back to Add action. Store interceptor shows proper errors on the “Add” action but filled in values on the form are lost during redirect action.
I loose Value Stack on redirection, I understand that.
Is there any solution to this?
Don’t want to use result param, too much work.
<action name="add" class="com.myapp.actions.StudentAction" method="input">
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
<result name="input" type="tiles">/student.edit.tiles</result>
</action>
<action name="processAdd" class="com.myapp.actions.StudentAction">
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result name="success" type="redirectAction">list</result>
<result name="input" type="redirectAction">add</result>
<result name="failure" type="redirectAction">add</result>
</action>
What you’re looking for is the Scope Interceptor, not the Store Interceptor.