struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam <a...@getcare.com>
Subject Re: html:select
Date Tue, 12 Feb 2002 21:46:50 GMT
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:larry_maturo@AthensGroup.com]
>Sent: Monday, February 11, 2002 2:50 PM
>To: 'dmccall@allidex.com'
>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: lmaturo@athensgroup.com
>5608 Parkcrest Drive
>Suite 200
>Austin, Texas  78731-4916
>voice: 512.345.0600 ext. 129
>fax: 512.345.4088
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message