<action name="myFirstAction" class="myClass" method="myMethod">
<result type="redirectAction" name="stg-myMethod-returns">
<param name="actionName"> mySecondAction </param>
<param name="param-name-to-send"> ${paramVariable} </param>
</result>
<result type="dispatcher" name="stg-else-myMethod-returns"> jspToTreatOtherCases.jsp </result>
</action>
* Parametrii suplimentari de trimis din myFirstAction in mySecondAction trebuie sa aiba setteri/getteri in myFirstAction pentru a putea fi vazuti de xml-ul Struts prin ${paramVariable}.
* redirectAction si actionName sunt cuvinte-cheie.
Niciun comentariu:
Trimiteți un comentariu