On 10/12/05, katre <[EMAIL PROTECTED]> wrote: > > Um, well, what _I've_ been doing is setting the appropriate ActionForm > > value before I display the form, not in reset but in the Action's > > execute method (reset works too, but because I've never used > > validate="true" I'm doing setup stuff in the Action anyway). After form > > submision I look at the form value of the checkbox (I usually use > > Boolean, but I almost always use DynaValidatorActionForms, so YMMV on > > that one). > > Right, and this does work, but it requires having a separate action > leading to every form. Which isn't such a huge inconvenience, really, > just more code.
In Struts JSP page is regarded as data-aware HTML and is used for output only. All input should pass through an action. > More importantly (and getting back to my original question), it means > that when using a dyna form, you can't use the initial attribute for > properties. You have to write code to set them to the default value in > that separate action (and thus separating the form from the logic). Um, right, you have to clear values associated with checkboxes in reset method, right before the form fields are populated by Struts. I guess, this means that you cannot use session-scoped dynaforms for pages with checkboxes. I don't use dynaforms anyway but I see that this is a shortcoming. You can still use request-scoped dynaforms. Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]