I'm not sure I understand... do you just need to have the group name when you display the detail for the selected item, or do you need the entire select list (to avoid getting it from the datavase each time?)

If you just need the grou pname, could you simply put the group name in session? May or may not work depending on the flow of your app, but it would be a nice, simple solution if it'll work... just remember to clear it out at an appropriate time.

The other option that comes to mind immediately is indeed to use Javascript... seems like all you'd need is a form with two hidden fields, groupName and value... onChange of the select, populate those two fields and submit() the form. You'd then have both pieces of information to render your detail page.

Or maybe I don't understand the problem?

Frank

[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?


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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

Reply via email to