In the first listing, you have "property" and "value" attributes 
of the html:select tag set to the same thing. Is that right? I 
would imagine property would be something like "org" while value 
should be something like "24", the actual value of the item 
which should be selected.

Sean


On Thursday, January 31, 2002, at 11:11  AM, Maturo, Larry wrote:

> I'm sorry if this is a resend, but I have been having
> problems sending emails to the outside world, so I
> don't know if this ever made it to the mailing list,
> and I haven't seen any responses.
>
> I have noticed that the value attribute of the select
> tag, which is said to be a run-time expression in the
> struts tag documentation, does not seem to work that way.
>
> I have the following select statement:
> <html:select property="<%= OrganizationForm.PARENT_ORG_ID %>"
>       
> value="<%=OrganizationForm.PARENT_ORG_ID %>">
>       <html:options collection="<%= Constants.ORG_LIST %>"
>                       property="<%= Constants.SELECT_VALUE %>"
>                       labelProperty="<%= Constants.SELECT_LONG_NAME %>"/>
> </html:select>
>
> where I want to use the same variable both to initialize the select
> statement,
> and also to have it get set by the selected value after the 
> user makes a
> selection.
> This does not work.  I always get the first item in the list selected.
> However,
> if I substitute this:
> <html:select property="<%= OrganizationForm.PARENT_ORG_ID %>" 
> value="24">
>       <html:options collection="<%= Constants.ORG_LIST %>"
>                       property="<%= Constants.SELECT_VALUE %>"
> labelProperty="<%= Constants.SELECT_LONG_NAME %>"/>
> </html:select>
>
> where 24 is one of the valid ids, it correctly selects the option that
> cooresponds to 24.
>
> Am I doing something wrong, is this a bug in the tag, or perhaps
> a bug in the documentation?
>
> -- Larry Maturo
>    [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:struts-user-
> [EMAIL PROTECTED]>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to