You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jd...@frii.com on 2001/06/18 21:40:58 UTC

Options tag

Hi,
    I want to populate a html:options tag inside a html:select from a
collection that is a member of my FormBean.

I've seen lots of examples in the list where the collection is an
attribute of the session. This is not what I have.

My form bean, 'timeForm', has an ArrayList, named availProjects,  as a
member. The availProjects  is populated with Project objects, each of
which has an member named 'projectDesc. I want to display the project
descriptions in my select tag.

This snip will populate the select with strings  that look like
references to the objects in the ArrayList. Now if only I could get the
projDescrition from each of those.

         <html:select property="currentProject" >

            <html:options   name = "timeForm" property =
"availProjects    />

          </html:select></td>


I've read about people using "nested" properties. Wouldn't
property="availProjects.projectDesc" be a use of a nested property?


thanks

john ware