"Once a user selects an option, the option value (rather than the
description) is recorded in a form bean, and the form bean is forwarded to another form."
So, the 'key' is the value that the user picked from the select control on the first page. I use 'key' as the name of the property on the form that holds that value. In your case, it looks like that would be the 'surveyType' property. So maybe you would use 'surveyForm.surveyType' instead of 'MyForm.key' ...
Also, I am a little confused by your JSP. It looks you are trying to hold the description in a hidden field on the form--this should not be necessary--I was under the impression that you wanted to render the description on the page following this JSP.
[EMAIL PROTECTED] wrote:
Superb answer Bill.
I've coded the following which correctly gets the OptionsCollection, but I'm stumped as to what to substitute in place of 'MyForm.key':
<tr> <th align="right"> Type: </th>
<td align="left"> <logic:notEqual name="surveyForm" property="action" scope="request" value="Delete"> <html:select property="type"> <html:optionsCollection name="surveyTypes" property="optionsCollection"/> </html:select> </logic:notEqual> <logic:equal name="surveyForm" property="action" scope="request" value="Delete"> <html:hidden property="type"/><c:out value="${surveyTypes.optionsMap[MyForm.key]}"/> </logic:equal>
</td> </tr>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]