struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siggelkow, Bill" <>
Subject RE: Ye olde html:options tag?
Date Thu, 02 Jan 2003 21:32:04 GMT
Try using the 'collection' attribute instead of 'name' ... otherwise, the tag interprets the
name/property combination as identifying the collection.

    <html:options collection="users" property="email" labelProperty="email"/>

\-----Original Message-----
From: Michael P []
Sent: Thursday, January 02, 2003 4:17 PM
Subject: Ye olde html:options tag?

I apologize for this basic question, but I'm new to struts and Java web
programming in general, and I really can't get the <html:options> tag to

The error I'm getting, specifically, is:
  javax.servlet.jsp.JspException: No getter method available for property
        email for bean under name users

My JSP defines a collection like this:
  <bean:define id="users" name="adminLoginForm" property="users"

Then tries to use it like this:
  <html:select property="email">
    <html:options name="users" property="email" labelProperty="email"/>

My understanding of this is that it will call getUsers() on the
adminLoginForm bean to get a Collection, and then on each item within the
collection, will call getEmail() to retrieve the option property and

Do I need to define a bean somewhere (in some XML file?) for the user
objects contained within the collection or something?  The collection
contains UserView objects that /do/, in fact, have a getEmail() method, so
I can't figure out why this won't work.

I have defined a form-bean for the login form:
    <form-property name="email" type="java.lang.String"/>

Thanks for any help you can offer...

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message