If the value of the parameter matches the value of the collection it will be set a s selected by struts
Dean McCall wrote: >Thanks for the reply. > >But I don't follow. > >I am trying to get a select tag that looks like: > ><select name="destination"> > <option value="SENT" SELECTED>Sent</option> > <option value="RECEIVED">Received</option> ></select> > >How do I set the SELECTED attribute of the first option? > >Dean > >-----Original Message----- >From: Maturo, Larry [mailto:[EMAIL PROTECTED]] >Sent: Monday, February 11, 2002 2:50 PM >To: '[EMAIL PROTECTED]' >Subject: RE: html:select > > >Hi Dean, > >You wrote: > >>>Hello, >>> > >>>How do I set the default value for <html:select> tag when I am populating >>>the list from a collection? >>> > >>>Example: >>> > >>><html:select property="destination"> >>> <html:options collection="destinations" property="value" >>>labelProperty="label"/> >>></html:select> >>> > >Strut's tags are two-way, so whatever value is in "destination" >will be used, i.e. "destination" is also "source". :-) > >I hope this helps. > >Larry Maturo, Software Consultant, Athens Group, Inc. > >Athens Group is an employee-owned technology strategy and custom software >development consulting company > >web: http://www.athensgroup.com >email: [EMAIL PROTECTED] >5608 Parkcrest Drive >Suite 200 >Austin, Texas 78731-4916 >voice: 512.345.0600 ext. 129 >fax: 512.345.4088 > > > >-- >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]>