Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mulitpage form in struts

 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is there example for handling multipage form, which
handles validation on each page, and handle
forward-backward navigation buttons.

Ashish
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic