You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jan Fredrik Øveraasen <ja...@cellnetwork.no> on 2001/05/23 11:30:16 UTC

Architecture for a form-wizzard

Hi
I`m building a site that uses a application form that spans over several
pages. How should I design this application?
1. With formBeans for every page
2. One formBean for the entire application form

All suggestions appreciated

Jan Fredrik

	___ Jan Fredrik Øveraasen | Senior Systems Developer 
	___ Cell Network ASA | Pb. 5313, Sørkedalsv. 10A, N-0304 Oslo,
Norway
	___ Tel: +47 23196600/35 | Fax: +47 23196601 | Mob: +47 93 49 99 88
   ___ http://www.cellnetwork.com/ |
mailto:jan.fredrik.overaasen@cellnetwork.no

 


Re: Architecture for a form-wizzard

Posted by Jeff Trent <jt...@structsoft.com>.
I used one form bean and kept a field in it called 'page'.  When validate is
called, it only validates that one page.  However, a few things I found was
this:
    * By default, turn validate off (in struts-config).  Call validate
yourself from the action class.
    * Override reset() to do nothing.

Other than that, its mostly cut and dry.  Check out the mail archives for
more example of wizards.

----- Original Message -----
From: "Jan Fredrik Øveraasen" <ja...@cellnetwork.no>
To: "STRUTS (E-mail)" <st...@jakarta.apache.org>
Sent: Wednesday, May 23, 2001 5:30 AM
Subject: Architecture for a form-wizzard


Hi
I`m building a site that uses a application form that spans over several
pages. How should I design this application?
1. With formBeans for every page
2. One formBean for the entire application form

All suggestions appreciated

Jan Fredrik

___ Jan Fredrik Øveraasen | Senior Systems Developer
___ Cell Network ASA | Pb. 5313, Sørkedalsv. 10A, N-0304 Oslo,
Norway
___ Tel: +47 23196600/35 | Fax: +47 23196601 | Mob: +47 93 49 99 88
   ___ http://www.cellnetwork.com/ |
mailto:jan.fredrik.overaasen@cellnetwork.no






RE: Architecture for a form-wizzard

Posted by "A.Sharma" <a....@nihilent.com>.
hi
in my opinion, have a bean for every page. in case a page has only one/two
fields you might consider clubbing it with some other "relevant" page.
The point is if you have only one bean, it would eventually be more like a
procedural programming concept.
Consider if ther was only one bean, The controller servlet will create the
bean in the very begining, while visiting the first page. Now there might be
several fields, relating to some other pages (Which the user might never
visit as well), they will also be created(though not initialized), this
doesnt sound too good. And when eventually those pages are visited, you will
have to manually set the properties in bean by calling setter functions!!!

this is what my understanding of struts is. Though i would admit i have not
worked much on it/nor working currently on it.

regards
Aashish .


-----Original Message-----
From: Jan Fredrik Øveraasen
[mailto:jan.fredrik.overaasen@cellnetwork.no]
Sent: Wednesday, May 23, 2001 3:00 PM
To: STRUTS (E-mail)
Subject: Architecture for a form-wizzard


Hi
I`m building a site that uses a application form that spans over several
pages. How should I design this application?
1. With formBeans for every page
2. One formBean for the entire application form

All suggestions appreciated

Jan Fredrik

	___ Jan Fredrik Øveraasen | Senior Systems Developer
	___ Cell Network ASA | Pb. 5313, Sørkedalsv. 10A, N-0304 Oslo,
Norway
	___ Tel: +47 23196600/35 | Fax: +47 23196601 | Mob: +47 93 49 99 88
   ___ http://www.cellnetwork.com/ |
mailto:jan.fredrik.overaasen@cellnetwork.no