struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Berry" <>
Subject RE: html:options list source question
Date Mon, 14 Jul 2003 17:31:43 GMT
Thanks for the very useful information.  Everything you said worked with
a single exception; to get the correct interpretation of the property
value pointing to a collection of LabelValueBeans, I needed to use
html:optionsCollection rather than html:options .

-----Original Message-----
From: Wendy Smoak [] 
Sent: Sunday, July 13, 2003 9:22 PM
To: 'Struts Users Mailing List'
Subject: RE: html:options list source question

Craig Berry wrote:
> The jsp page contains an html:form section linked via action mapping 
> to
the EditDeForm type.  
> In it, there is a select/options section that looks like this:
> <html:select property="numFmt">
>   <html:options collection="numFmtOptions" 
>   property="value"
>   labelProperty="label"/>
> </html:select>
> I had thought that this would be enough to make it work.

The docs say that if you don't specify 'name', it will look to the form
bean for 'property'.  

So without the <bean:define> (definitely not needed) did you try:
<html:options property="numFmtOptions" /> ?

(I'm not sure if you'd still need labelName/labelProperty, I suspect not
since you're using LabelValueBean.)

(BTW, you don't need the 'set' method to be a bean, read-only properties
are perfectly acceptable.)

Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message