On 04/12/03 17:33:12 -0700 Wendy Smoak wrote:
>> The following is in the TagLib docs for <html:select/>:
>> "WARNING: In order to correctly recognize cases where no selection at
>> all is made, the ActionForm bean associated with this form must include
>> a statement resetting the scalar property to a default value (if
>> multiple is
>
>> not set), or the array property to zero length (if multiple is set) in
>> the
>
>> reset() method."
>> I'm using a dynamically defined form of type DynaValidatorForm.
>> What should I be doing to comply with the above warning?
>> I'm not understanding what is meant.
>
> Assuming you have the initial values set as you need them in
> struts-config.xml, I believe this works to put everything back to initial
> values:
> public void reset (...)
> { initialize(mapping); }
Where to put this if I don't actually have any ActionForm classes?
> However, it was pointed out to me in the past that the HTML spec says
> that a <select> element must always have one item selected. I didn't go
> read it for myself though, as my workaround was to stick a "None of the
> above" selection at the bottom and pre-select it. ;)
So, what is needed for the standard, "Please Choose One" scenario where the
user *must* choose from the list or a validation error should be raised?
Thanks for your help,
A.
--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
|