My Collection, PageBeans (plural), generates a drop-down list like this:
<html-el:select property="document"> <html-el:option value="">-Select-</html-el:option> <html-el:options collection="PageBeans" property="name" labelProperty="name"/> </html-el:select>
Each individual bean, PageBean (singular), in the
Collection has two properties; name and groupID. I
want to display 'name' in the drop down list. However, I want the 'value' of 'groupID' to be
submitted when users click on the Submit button.
Therefore, the statement in the servlet:
String selected = request.getParameter( "document" );
picks up the value of the 'groupID' instead. Do I change the generation of the drop-down menu:
<html-el:select property="document"> <html-el:option value="">-Select-</html-el:option> <html-el:options collection="PageBeans" property="groupID" labelProperty="name"/> </html-el:select>
Yes, that should work - "property" holds the values that will be passed with the form, and "labelProperty" holds the labels that will be seen by the user.
Matt
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]