wood burning stoves 2.0*
The moose likes Struts and the fly likes  mulitpage form in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " mulitpage form in struts" Watch " mulitpage form in struts" New topic
Author

mulitpage form in struts

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi
Is there example for handling multipage form, which
handles validation on each page, and handle
forward-backward navigation buttons.

Ashish


A$HI$H
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I think, you want tot create paging with Struts or not ?

If yes,

Struts does not directly support paging. Options:

1.If size of the resulting data is managable (i.e. you can tolerate having the database returning you the entire set of result), you can make use of the offset and length attributes of <logic:iterate> together with a hidden "pageNo" variable in the form.
2. Address this at the JDBC level.
3. Use other paging taglibs.


Paging


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi
No i want to build questioner which goes for 3-4 pages,
and at the end the user hits enter, to submit data to database
Ashish
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by ashish kulkarni:
Hi
No i want to build questioner which goes for 3-4 pages,
and at the end the user hits enter, to submit data to database
Ashish


I dont extensively use struts. But is it ok to have one huge monolithic form to handle the submits on all pages?
the scope for the form would be 'session' so that it is available to all the action classes that get called during navigation.
The validate() could get a little tricky here depending upon which page you are in while filling out the questionnaire
 
jQuery in Action, 2nd edition
 
subject: mulitpage form in struts
 
Similar Threads
Words that differ by one letter
how to add values to servlet and call that servlet
WA #2 ..... word association
validation.xml NullPointerException
Value from select element is null in request