You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinh Tran <vi...@processintelligence.com> on 2003/03/14 17:02:57 UTC

Mutlipage Forms Again (DynaValidatorForm)

I have scoured the archives and still have not made any progress on using
DynaValidatorForm for multi page forms (wizards).  I did find a bug about
the page attribute not being set with DynaValidatorForm.  Has this been
resolved with 1.1-b3?  If so, can anyone provide some techniques/best
practices on implementing multipage forms using DynaValidatorForm?

Thanks.  Vinh.

RE: Mutlipage Forms Again (DynaValidatorForm)

Posted by Vinh Tran <vi...@processintelligence.com>.
I am trying out the page attribute for validation assuming the known bug has
been fixed. No one has confirmed either way and I couldn't tell from the
release notes or bugzilla. Probably just me being doing a poor search but I
could not find it.

Anyway, I'm pretty sure with the page attribute this should be relatively
simple.  If not, I may have to try your approach.

Vinh

-----Original Message-----
From: Rick Reumann [mailto:r@reumann.net]
Sent: Friday, March 14, 2003 11:23 AM
To: Struts Users Mailing List
Subject: Re: Mutlipage Forms Again (DynaValidatorForm)


On Fri, 14 Mar 2003 11:02:57 -0500
"Vinh Tran" <vi...@processintelligence.com> wrote:

> I have scoured the archives and still have not made any progress on
> using DynaValidatorForm for multi page forms (wizards).  I did find a
> bug about the page attribute not being set with DynaValidatorForm.
> Has this been resolved with 1.1-b3?  If so, can anyone provide some
> techniques/best practices on implementing multipage forms using
> DynaValidatorForm?


I'm sorry I didn't catch the beginning of this thread so if this has
been mentioned or won't work for you situation forgive me-

What if you had one master bean of all the information you attempt to
collect. I'd probably just stick that in session scope.

Then you use separate DynaValidatorForms to collect the appropriate
information on each of the pages.

Then in each of your actions I'd populate the main bean in the session
with the appropriate information.

This might be an ugly way to make sure they follow the proper flow, but
I would just set a variable called "stepVal" or "pageval" in the main
bean in the session and give it a number. Then in each action (step
through your wizard) you make sure that the "stepVal" is less than this
action's value. That way they can't move forward without having
completed early steps.

Would that work? Seems relatively clean to me.



--
Rick Reumann

---------------------------------------------------------------------
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


Re: Mutlipage Forms Again (DynaValidatorForm)

Posted by Rick Reumann <r...@reumann.net>.
On Fri, 14 Mar 2003 11:02:57 -0500
"Vinh Tran" <vi...@processintelligence.com> wrote:

> I have scoured the archives and still have not made any progress on
> using DynaValidatorForm for multi page forms (wizards).  I did find a
> bug about the page attribute not being set with DynaValidatorForm. 
> Has this been resolved with 1.1-b3?  If so, can anyone provide some
> techniques/best practices on implementing multipage forms using
> DynaValidatorForm?


I'm sorry I didn't catch the beginning of this thread so if this has
been mentioned or won't work for you situation forgive me-

What if you had one master bean of all the information you attempt to
collect. I'd probably just stick that in session scope.

Then you use separate DynaValidatorForms to collect the appropriate
information on each of the pages.

Then in each of your actions I'd populate the main bean in the session
with the appropriate information.

This might be an ugly way to make sure they follow the proper flow, but
I would just set a variable called "stepVal" or "pageval" in the main
bean in the session and give it a number. Then in each action (step
through your wizard) you make sure that the "stepVal" is less than this
action's value. That way they can't move forward without having
completed early steps. 

Would that work? Seems relatively clean to me.



-- 
Rick Reumann

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