> A long time ago, someone suggested to add a control > in the struts-config.xml so the reset() is not always mandatory > but can be disabled in the struts-config.xml. > > May be it sounds like an anti-pattern from the gurus, > but to me, it sounds like a very interesting option, > for real-life apps. Which kind of class should be > modified for that? > > Does it sound like an interesting add-on for Struts in general?
reset() is NEEDED for correct checkbox handling. It is not mandatory to put code in reset() : this method has a default implementation that does nothing. If you need a "reset all value" method, create a new "resetValues()" metod that does what you need in "real-life", but don't alter reset() mecanism, or you will get at any time (as I did on some struts projects) some complex checkbox bugs. Altering Struts code will make it more complex to give you help if you get bugs or strange behaviour, so I think you should use reset() for checkbox and some other "set to default" struts mecanism, and add your own methods to formbeans as needed. Nico. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

