struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@henchmonkey.org (katre)
Subject Re: DynaActionForm, Boolean checkboxes, and Initial
Date Wed, 12 Oct 2005 17:22:14 GMT
Michael Jouravlev wrote:
> > 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.

The problem is with both request and session-scoped dynaforms, when
using the initial attribute if the form-property to pre-populate the
form.  In this case, the form gets pre-populated with the "initial"
value even when it is being populated from the request, which causes the
problem.

katre


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message