struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: PROPOSAL: collectionProperty attribute in <html:options>
Date Tue, 06 Nov 2001 21:55:48 GMT
martin.cooper@tumbleweed.com wrote:
> 
> I think I agree with what you're suggesting, but let me make sure. A "full"
> usage of the tag you are proposing (i.e. specifying all the important
> attributes) would look like this:
> 
> <html:optionsCollection
>      name="myFormBean"
>      property="myOptionBeans"
>      label="myLabel"
>      value="myValue" />
> 
> where 'name' and 'property' do the usual thing; the object that is obtained
> by them is a collection; and each member of the collection is an object
> which has getters and setters for properties named "myLabel" and "myValue".
> 
> The default values for 'label' and 'value' would allow you to use a
> standard bean type, which you called LabelValue, to represent each option.
> (Or, of course, you could have your own bean type which had the appropriate
> properties.)
> 
> Did I get this right?


Yes. 

 
> By the way, I believe your LabelValue bean would be the same as a class I
> checked in for exercise-taglib recently. It's
> org.apache.struts.webapp.exercise.OptionBean. I can promote this to be a
> real Struts class if that would be useful.

Sure. Under utils? 

I take it that it's compatible with the LabelValueBean from Craig's
Example application. We would then use its property names for the
optionsCollection defaults.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

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


Mime
View raw message