struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naresh Sharma <Naresh_Sha...@KeaneIndia.Com>
Subject Select + optionsCollection tag
Date Wed, 07 Jul 2004 04:04:54 GMT
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 re-populate the value object from backend 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>

 

Is there any other way by which we can make the desired option from HashMap
selected?

 

Please suggest.

 

 

Regards

Naresh

 


Mime
View raw message