You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nanduri, Amarnath" <Am...@Agilquest.com> on 2001/02/28 22:44:45 UTC

flow control

Hello you beautiful people,

     I am a newbie to struts and our company has to decide whether to go
with struts or not. I have a very important question that will decide the
fate of our project...

 Basically we want to control the flow (of the user) when he goes to various
pages. 

For example i have 5 jsp pages.... a.jsp ,b.jsp, c.jsp, d.jsp and e.jsp

The order of flow is  a->b->c->d->e. The user has to strictly adhere to this
flow. The user can't jump from a to c or d to e  or e to a or d to c. etc.. 

Is this possible using struts ? If so, what steps do i have to go through to
make sure that the user can adhere to this flow ? Thanks a lot.

cheers,
Amar..

Re: flow control

Posted by Martin Cooper <ma...@tumbleweed.com>.
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
>



Re: flow control

Posted by bram <br...@info.nl>.
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


Re: flow control

Posted by Craig Tataryn <Cr...@msdw.com>.
You can definitly do this in Struts as it stands (correct me if I'm wrong).
What will help this along is the Workflow Processing TODO in the TODO 1.1
document on the struts homepage.  When that is completed you will be able to map
out this flow in some graphical type means.

Craig T.

"Nanduri, Amarnath" wrote:

> Hello you beautiful people,
>
>      I am a newbie to struts and our company has to decide whether to go
> with struts or not. I have a very important question that will decide the
> fate of our project...
>
>  Basically we want to control the flow (of the user) when he goes to various
> pages.
>
> For example i have 5 jsp pages.... a.jsp ,b.jsp, c.jsp, d.jsp and e.jsp
>
> The order of flow is  a->b->c->d->e. The user has to strictly adhere to this
> flow. The user can't jump from a to c or d to e  or e to a or d to c. etc..
>
> Is this possible using struts ? If so, what steps do i have to go through to
> make sure that the user can adhere to this flow ? Thanks a lot.
>
> cheers,
> Amar..

--
I've been trying to change the world for years, but they just won't give me the
source code....