You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Rautenberg, Stefan" <St...@dresdner-bank.com> on 2000/12/21 10:07:17 UTC
Creating Wizards with struts 0.5
Hi all,
Using struts 0.5 in a Solaris/Jrun 3.0 environment, we got the
following problem:
We set up an input form in a wizard style with 9 different pages.
Each page should be able to lead to the next and previous page.
To do this each of those 9 pages has to submit it's form to the same
action and action form bean. Is this true ?
To recognize the actual page being submitted we need either a hidden
field ("actualPage = x").
Due to much data being submitted we need to submit the forms as
method=post.
And this is the problem:
Submitting the form using the struts:submit tag the corresponding
action and/or actionform isn't found.
Calling the action via javascript ("location.href =
AddEventTest.do?actualPage=x") both actionform and action is found, but the
input fields in the
Input form ("addEventActionForm") are not submitted.
Our Form tag:
<struts:form name="addEventActionForm" action="/AddEventTest.do"
type="com.dresdnerkb.gm.appdev.stargate.actionform.AddEventActionForm">
Our submit tag:
<struts:submit>Next</struts:submit>
Our action.xml entry:
<!-- add event to contact -->
<action path="/AddEventTest"
actionClass="com.dresdnerkb.gm.appdev.stargate.action.AddEventTestAction"
formAttribute="addEventActionForm"
formClass="com.dresdnerkb.gm.appdev.stargate.actionform.AddEventActionForm"
inputForm="/CM/CM_ev_WizardAddEvent_1.jsp"
targetFrame="Events"
targetComponent="CM"
targetModule="ev"
targetUpdateInfo="true"
targetRowInfo="-1">
<forward name="page1"
path="/CM/CM_ev_WizardAddEvent_1.jsp"/>
<forward name="page2"
path="/CM/CM_ev_WizardAddEvent_2.jsp"/>
<forward name="page3"
path="/CM/CM_ev_WizardAddEvent_3.jsp"/>
<forward name="page4"
path="/CM/CM_ev_WizardAddEvent_4.jsp"/>
<forward name="page5"
path="/CM/CM_ev_WizardAddEvent_5.jsp"/>
<forward name="page6"
path="/CM/CM_ev_WizardAddEvent_6.jsp"/>
<forward name="page7"
path="/CM/CM_ev_WizardAddEvent_7.jsp"/>
<forward name="page8"
path="/CM/CM_ev_WizardAddEvent_8.jsp"/>
<forward name="page9"
path="/CM/CM_ev_WizardAddEvent_9.jsp"/>
<forward name="success"
path="/RedirectWizardToActionTarget.jsp"/>
<forward name="failure" path="/MessageBoard.jsp"/>
</action>
Also a question is:
How does struts know which page caused a failure in the actionform's
validate method when there only one accessible input form is in this entry ?
We are still using struts 0.5 because our test with the 1.0 nightly
builds ran into a "DTD not found" message which we couldn' resolve yet.
Posting this in the mailing list earlier unfortunately brought no
answer :-(
However, the struts users guide tells about the possibility to
create such "wizard style" forms.
Any hints or help is appreciated.
Thanks in advance
Stefan
Stefan Rautenberg
Dresdner Kleinwort Benson
GBS IT Application Development
Jürgen-Ponto-Platz 1
D-60301 Frankfurt am Main
Tel: +49 - 69 - 263 - 16285
Fax: +49 - 69 - 263 - 18839
eMail: <mailto: Stefan.Rautenberg@Dresdner-Bank.com
<ma...@Dresdner-Bank.com> >