struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <Wendy.Sm...@asu.edu>
Subject RE: How to interate through a collection?
Date Wed, 23 Jul 2003 17:55:49 GMT
Rick wrote:
> If I have a collection of employees, an employee has a
> name and id (int). How can I iterate through this
> collection and put every employee between
> <html:option>?

Use <html:options> (note the plural, not 'option') and feed it the
collection.  You don't need to do the iteration manually.  This has the
added bonus of Struts pre-selecting the correct values based on the form
bean.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message