struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Kyser <ktra...@comcast.net>
Subject Re: REPOST: How to specify input to validating multi-page wizard?
Date Wed, 05 Mar 2003 20:37:25 GMT
Thanks, Larry & James, I appreciate the feedback. Will proceed that way 
then.

-jeff

On Wednesday, March 5, 2003, at 02:34  PM, James Higginbotham wrote:

> I assume you are managing the wizard using your own action and 
> mappings?
> If so, I did a similar design for my product. Essentially, I had to
> create a mapping for each step so that the input could be specified
> properly. Then, each JSP posted to the proper step mapping. For 
> example,
> I had /wizard1, /wizard2, and /wizard3.. On the 2nd wizard page, I had
> it post to /wizard2, whose mapping had an input="/my/wizard2.jsp" to
> ensure it goes to the second step.. IN the validation framework, you 
> can
> specify the page number using a hidden field on each JSP, like hidden
> name="page" value="2", and specify the same page number as an attribute
> in the validation.xml file for your bean.
>
> HTH,
> James
>
>> -----Original Message-----
>> From: Jeff Kyser [mailto:ktrails@comcast.net]
>> Sent: Wednesday, March 05, 2003 2:30 PM
>> To: Struts Users Mailing List
>> Subject: REPOST: How to specify input to validating multi-page wizard?
>>
>>
>> I guess I should have indicated that I am letting the
>> validation framework handle this. Is my only choice for this
>> to turn validation off and explicitly call validate() in the
>> Action where I can then direct it to the appropriate wizard page?
>>
>> thanks,
>>
>> -jeff
>>
>> On Wednesday, March 5, 2003, at 11:22  AM, Jeff Kyser wrote:
>>
>>> Hello,
>>>
>>> I have an Action for a multi-page wizard. I'm using
>> DynaValidatorForm.
>>>
>>> What I'm having trouble with is this: if I submit a page
>> and it fails
>>> due to validation rules, how can I direct it back to the "current"
>>> page?
>>>
>>> As you can see below, I've supplied input="sandbox.wizard.page1" to
>>> give it the first page to fall back to, but that's no good
>> if the user
>>> makes it past the first page and fails on the second. ('d want to
>>> display the second page there and let them try again)
>>>
>>> If I omit the input parameter, I get (as expected):
>>>
>>> 	No input attribute for mapping path /wizard
>>>
>>> Any ideas?
>>>
>>> TIA,
>>>
>>> -jeff
>>>
>>> my struts-config.xml snippet below:
>>>
>>>         <action path="/wizard"
>>>                 type="torch.webapp.sandbox.action.WizardAction"
>>>                 name="wizardForm"
>>>                 scope="request"
>>>                 validate="true">
>>>             <forward name="failure"
>>>                      path="/do/go2wizard">
>>>             </forward>
>>>             <forward name="page1"
>>>                      path="sandbox.wizard.page1">
>>>             </forward>
>>>             <forward name="page2"
>>>                      path="sandbox.wizard.page2">
>>>             </forward>
>>>             <forward name="done"
>>>                      path="/do/wizard/success">
>>>             </forward>
>>>         </action>
>>>
>>>         <action path="/go2wizard"
>>>                 parameter="sandbox.wizard.page1"
>>>                 validate="false"
>>>                 name="wizardForm"
>>>                 type="org.apache.struts.actions.ForwardAction">
>>>         </action>
>>>
>>>         <action path="/wizard/success"
>>>                 parameter="sandbox.wizard.success"
>>>                 validate="false"
>>>                 name="wizardSuccessForm"
>>>                 type="org.apache.struts.actions.ForwardAction">
>>>         </action>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message