Hello
I try to use a lookupDispatchAction to implement a WIZARD FORM as it is
wrote in the Struts cookbook and there is some things i still don't
understand:
Context:
<action path="/ViewStep1"
name="CreateAccesForm"
scope="session"
validate="false"
type="org.apache.struts.actions.ForwardAction"
parameter=".portail.acces.societe"/>

<action path="/ProcessStep1"
name="CreateAccesForm"
scope="session"
validate="true"
type="com.studiocanal.extranetPortail.fo.acces.actions.DemAccesAction"
input=".portail.acces.societe"
parameter="method">
<forward name="next" path="/ViewStep2.do"/>
<forward name="fail" path="/ViewStep1.do"/>
</action>

I have a List of DTO in my ActionForm ("CreateAccesForm") and others simple
properties;
i do some business in an action(ProcessStep1.do method="Verif" ) to set my
form properties with the values coming from the DB. When i finally return
mapping.findForward("fail") which call the ViewStep1.do forwardAction to
bring me back to the same jsp, my input form.
So, my jsp page ".portail.acces.societe" only display the values of my List
form properties and the others have disappear!


But if i use a forward path directly to my jsp, like that :

<forward name="fail" path=".portail.acces.societe"/>
I can find the real values of my form properties set in the html form.

So my question is why the org.apache.struts.actions.ForwardAction resets my
form simple properties according to what it find in the request, i imagine,
and does not to the DTO List properties ??

Finally, what is the goal the ViewStep1 action, ViewStep2 and so on ?

Thanks in advance

Struts config for the wizard:
<!-- Wizard Creation mappings -->

<action path="/ViewStep1"
name="CreateAccesForm"
scope="session"
validate="false"
type="org.apache.struts.actions.ForwardAction"
parameter=".portail.acces.societe"/>

<action path="/ProcessStep1"
name="CreateAccesForm"
scope="session"
validate="true"
type="com.studiocanal.extranetPortail.fo.acces.actions.DemAccesAction"
input=".portail.acces.societe"
parameter="method">
<forward name="next" path="/ViewStep2.do"/>
<forward name="fail" path=".portail.acces.societe"/>
</action>

<!-- Step 2: Compte -->
<action path="/ViewStep2"
name="CreateAccesForm"
scope="session"
type="org.apache.struts.actions.ForwardAction"
validate="false"
input=".portail.acces.compte"
parameter=".portail.acces.compte"/>

<action path="/ProcessStep2"
name="CreateAccesForm"
scope="session"
type="com.studiocanal.extranetPortail.fo.acces.actions.DemAccesAction"
parameter="method" validate="false">
<forward name="previous" path="/ViewStep1.do"/>
<forward name="next" path="/ViewStep3.do"/>
</action>

<!-- Step 3: Droits -->
<action path="/ViewStep3"
name="CreateAccesForm"
scope="session"
type="org.apache.struts.actions.ForwardAction"
input=".portail.acces.droits"
validate="false"
parameter=".portail.acces.droits"/>

<action path="/ProcessStep3"
name="CreateAccesForm"
scope="session"
type="com.studiocanal.extranetPortail.fo.acces.actions.DemAccesAction"
parameter="method">
<forward name="previous" path="/ViewStep2.do"/>
<forward name="finish" path="/wizard_done.jsp"/>
</action>

--
Cordialement,
Arnaud Gonzales.

Reply via email to