You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ted Husted <hu...@apache.org> on 2002/03/19 17:43:34 UTC

Re:
The syntax for doing this in the 1.0.x distribution is clumsy. You have
to define the collection as a bean first, and then refer to it. 

<bean:define id="imageTexts" name="donorForm" 
	property="imageTexts" type="java.util.Collection"/>
<html:options collection="imageTexts" property="value"
labelProperty="label"/>

There's a new tag for 1.1 that simplifies this so you can skip the
bean:define step.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Michael wrote:
> 
> i started using the <html:select> and <html:options>.
> 
> i'm getting confused with the attributes of the
> <html:options> tag.
> 
> can the collection be an object within another bean?  IE
> "bean1.bean2.collectionName"
> and how does the current form object come into play?
> 
> i have my collection sitting in the form object, but the documentation
> is confusing me.. how do i reference the collection from the current form?
> 
> so far i can only get the collection to be found by placing it
> directly into the request object.
> 
> i want to get the collection from:
> 
> request-->(my ActionForm object)-->getA()-->getB()-->getMyCollection
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>