Hello I used the code below
<form:select style='FONT-SIZE: xx-small; WIDTH: 189px; size:1'
name='AuditActionFormBean'
property="selectedstatus" onchange='form.submit()'>
        <form:options name="AuditActionFormBean"
property="listauditstatus"/>
</form:select>

and my formbean has these properties,
    private Vector listauditstatus;
    private String selectedstatus;

it works quite fine. So, you don't need to do additional thing. If you want
to get a specific option, make sure that you have sent selectedstatus. For
example, manually write audit.do?selectedstatus=4
But if you don't want to send selectedstatus, you have to add value property
of <select>.
fehmi.


-----Ursprüngliche Nachricht-----
Von: Roland Berger [mailto:[EMAIL PROTECTED]]
Gesendet am: Thursday, November 22, 2001 1:39 PM
An: Struts Mailinglist
Betreff: How to display an option(s) in a select tag as checked

Hi all

I have a select box with several options. I'd like that a particular option
is alredy checked when the JSP page is dispayed to the user. How to do that?

i.e.

        <html:select property="fanum" size="1" style="width:100%">
        <html:options collection="RegionalClubs" property="value"
labelProperty="label"/>


Thank's
Roland


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

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

Reply via email to