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]

Reply via email to