You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Asad Habib <ah...@engin.umich.edu> on 2006/01/12 20:39:08 UTC

And Tags

Hello. I am using the select and options tags in one of my JSP pages. My 
first option has the value attribute set to an empty string (i.e. 
value='') and the second option has the value attribute equal to 0 (i.e. 
value="0"). For some reason, when the page is accessed the first time by a 
user, the default selected value is the second option instead of the first 
option. Does anyone why this is the case? Thanks.

- Asad

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


Re: And Tags

Posted by Wendy Smoak <ws...@gmail.com>.
On 1/12/06, Asad Habib <ah...@engin.umich.edu> wrote:

> Hello. I am using the select and options tags in one of my JSP pages. My
> first option has the value attribute set to an empty string (i.e.
> value='') and the second option has the value attribute equal to 0 (i.e.
> value="0"). For some reason, when the page is accessed the first time by a
> user, the default selected value is the second option instead of the first
> option. Does anyone why this is the case? Thanks.

The framework will pre-select the option that matches the value of the
associated form property.  Make sure that the form property is set to
"" if you want that one to be selected.

If you need more help, post the <html:select> tag and the relevant
parts of the form and action classes.

--
Wendy

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