Chapter 16 in wiki struts book will tell you how to use options collections w/ DAO, and it has a lab.
hth,
.V

[EMAIL PROTECTED] wrote:
I am sure there is a slick way to do this, but it escapes me at the moment.

I have a Select Box that I am populating with the <html:options> tag  The
result is:

<select name="cmbGroup" id="groupList">
    <option value="jk12341">Group 1</option>
    <option value="34t1fv1">Group 2</option>
    <option value="32fq21">Group 3</option>
   ...
</select>

I need the value for DAO actions performed from the search which will
return a detail bean for display on an output JSP.

On the output JSP I need to Display the Group Name that I selected from the
input.  My Form holds the group id and a field for the group name.  The
options that I can see are:

1.  Requery the Database for the output page to retrieve the name given I
have the key.  This would work, but seems like a lot of overhead to go to
the database each time.
2.  Create a delimited value (ie <option value="jk12341, Group 1">Group
1</option>) and use the String Split to get the value and label.  (I am
leaning toward this)
3.  use javascript to update the field each time the select changes.  The
problem with this is that the select box can be very large based on the
users selections on previous entries.
4.  Store the Value Label list in the session (Don't like this at all
because the volume of users that will use this application).

Any other suggestions?



--
thx,
.V

Broadband interface (RIA) + mail box safety = Roomity.com
<http://roomity.com/demo.jsp>
*Your* clubs, no sign up to read, ad supported; try broadband internet.

cell: 917 825 3035 in DFW
email: netsql at roomity.com


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

Reply via email to