You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Martin Cooper <ma...@tumbleweed.com> on 2001/03/01 01:49:23 UTC

Re: flow control

With option 1 below (the wizard option), you can ease the form-checking by
adding a hidden tag called "page" in each JSP, and adding a page property to
your form bean. Then your validate() method can decide what to validate
based on which page was submitted. You can also use the token support in the
Action class to ensure the user doesn't try to skip around in your
application.

Hope this helps.

--
Martin Cooper
Tumbleweed Communications

----- Original Message -----
From: "bram" <br...@info.nl>
To: <st...@jakarta.apache.org>; <Cr...@msdw.com>
Sent: Thursday, March 01, 2001 1:41 AM
Subject: Re: flow control


> You defitnely can do that, altough its still a bit messy, and after
checking
> other sources, mailings I noticed there are basicly 2 kinds of ways to
> tackle this:
> 1:
> one actionservlet, one formbean and let the actionservlet decide wich form
> to show, the bean has to be in the session for incremental updating and at
> the end of your "wizzard" do with the whole input what you want(send it to
a
> db or mail it or whatever). on the downside the form-checking is a bit
> messy.
> 2:
> multiple form beans and multiple actions and the actions "forward" to the
> next input form.
> nicer on the form-checking side, but the over-all state of the user is not
> clear, you have to implement a "model" in the session that you update with
> the actions. also the various xml-configuration files are not that
clear...,
> I like something like
> <action ....>
>     <forward ...>
>     <forward ...>
>     .....
> </action>
> and that describes your overall "wizzard"....
>
> well maybe I left something out or one of the guru's has a better way to
> tackle it...
>
> Bram
>