This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes checkboxes + multipage forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "checkboxes + multipage forms" Watch "checkboxes + multipage forms" New topic

checkboxes + multipage forms

Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429

I'm just starting learning struts, and one thing confuses me. The recommended way to allow the "unchecking" of a checkbox is to implement the reset() method, right? But what if the ActionForm is distributed across multiple pages? If the reset() method is implemented, should each page have an <html:hidden> entry for each field that's populated in other pages?

Thank you,
Roland Csibrei

Joined: Nov 29, 2005
Posts: 1
you can use something like this in your reset method:

So the reset method will reset you checkbox only on page 1, actually on the page, where your html:checkbox is placed. Dont forget to place a on your page. Certainly, you can change the page number as you will.
I recommend you to check out struts wizard functionality and maybe you can have a look in the source codes aswell.
It is sorta covered in the JavaRanch Style Guide.
subject: checkboxes + multipage forms
Similar Threads
calling reset on the form bean
Form Bean - Session Scope
Reloading Page completely after submit
"checked" property of a html:checkbox field ... ?
clear session scoped variable values