You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Naresh Sharma <Na...@KeaneIndia.Com> on 2004/06/25 13:28:15 UTC

select + optionsCollection tag

Hi,

 

I have a combo box, and populating hash map values in this box.

 

Once initial form is populated, if user selects any option from this box, it
will submit the form to my action class using method "callOnChange". And
action class does some operation and forward control back to this screen.
Now the problem is that its not displaying the selected option which user
have selected. Instead first element of the Hashmap comes as selected.

 

 

<html:select property="userStatus" styleClass="clsGenText" size="1"
onchange=" callOnChange ()">

<html:optionsCollection name="ExampleVO" property="userStatusMap"
label="value" value="key"/>

</html:select>

 

 

Please suggest.

 

 

Regards

Naresh