Hi Mano.

Thanks for your help

Could you explain it again.

I am not sure I understand...

C_stand already has the value of "test2", and still it is not selected.

-----Oprindelig meddelelse-----
Fra: Mano Chinthaka Dasanayaka [mailto:[EMAIL PROTECTED] 
Sendt: 15. november 2006 12:18
Til: 'Struts Users Mailing List'
Emne: RE: html:options selected

Yes u can...just set the value of   c_stand to value "test2" in action
class.. where u load this page...then it shud work..


Regards,
Mano

-----Original Message-----
From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 4:27 PM
To: Struts Users Mailing List
Subject: html:options selected

Hi.

I am trying to get html:select to work for my purpose.

Can anybody help me......

c_stand is a String value from PeopleBean in
request.getAttribute("people");
cs is a collection containing values in OptionValueBean.

If cs contains values test1, test2 and test3 and c_stand contains test2
I
want test2 to be selected in the html:select

Is that possible?

<logic:iterate id="element" name="people">
<bean:define name="element" id="c_stand" property="c_stand" />

<html:select property="c_stand">
<html:options collection="cs" property="value" labelProperty="option"/>
</html:select>

</logic:iterate>



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




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

Reply via email to