Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checkboxes + multipage forms

 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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,
Yuriy
 
Roland Csibrei
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic