Re: Can I make a dynamic list box from DB results
- From: "ducnbyu" <ducnbyu@xxxxxxx>
- Date: 28 Nov 2006 12:58:52 -0800
mike.a.rea@xxxxxxxxx wrote:
I have a JSP page that returns a set of several different values from a
db table. I can show these in tabular format without a problem.
However I was wondering if there was a way that I could use the
information in a drop down list box, maybe use one variable as the Item
Label and another one as the Value.
Any ideas on how I can do this? Thanks in advance.
Try:
<html:select property="selectField">
<html:option value="-- Select One --"/>
<html:optionsCollection property="table" label="name" value="code" />
</html:select>
In your form (java) class you probably already have a collection that
you use to display the table. In my example (note the capitalization),
the class in the collection would have getName() and getCode() methods.
.
- References:
- Can I make a dynamic list box from DB results
- From: mike . a . rea
- Can I make a dynamic list box from DB results
- Prev by Date: How to parse and manipulate a binary stream
- Next by Date: xsl document() function - java SimpleTransform cannot find file
- Previous by thread: Can I make a dynamic list box from DB results
- Next by thread: Re: Can I make a dynamic list box from DB results
- Index(es):