struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <j...@wendysmoak.com>
Subject Re: Struts <html:select> usage question
Date Thu, 30 Dec 2004 16:23:28 GMT
From: "dsarris" <chipix@gmail.com>
> I am trying to use the <html:select> tag with the
> <html:optionscollection> tag.
> Do I have to put the collection property inside the form bean of the
> form that contains the <html:select>?

The docs say if you leave off the 'name' attribute, the framework will look
to the enclosing form bean.  So use 'name' to tell it which bean to use.

Is there a reason to use <html:optionsCollection> over <html:options
collection="..."> ?  Just curious, I use the second one:

<html-el:select property="type">
    <html-el:options collection="contactTypes" property="key"
labelProperty="value"/>
</html-el:select>
(Where contactTypes is a Map sitting in Application scope.)

-- 
Wendy Smoak


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


Mime
View raw message