struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonam Belbase <Sonam.Belb...@morganstanley.com>
Subject <html:options>
Date Thu, 01 Jul 2004 20:31:10 GMT
I have the following:

<!--drop down of names -->
Please select a name:
<html:select property="Name">
    <html:options collection="AvailableNamesList" property="name" />
</html:select>

<!-- corresponding id -->
Your Id will be :
<html:text value="" property="Id" readonly="true" />

The collection AvailableNamesList contains objects that have two fields
- name and id. When
a user selects a name from the dropdown,  its corresponding id should be
displayed in the
<html:text> box.

How do I get it to look at the object in the AvailableNamesList whose
name was selected, retrieve
the id and populate the id property dynamically? I want to avoid a <% %>
section with
java code that iterates over the list and finds the object by looking at
the name. Is this possible?
If so, how?

Thanks,
SB

--
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.



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


Mime
View raw message