struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: Use of Iterator tag
Date Wed, 14 Aug 2002 18:22:53 GMT


On Wed, 14 Aug 2002, nathan phillips wrote:

> Date: Wed, 14 Aug 2002 17:11:50 +0000
> From: nathan phillips <nathanpp@hotmail.com>
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: RE: Use of Iterator tag
>
> I simply have a method named "iterator" in my bean that I'd like to use.  If
> I rename it to "getIterator" then it works fine.  However, I don't want to
> rename my method to "getIterator."  Any ideas?
>

Struts tags only work for properties that obey JavaBeans rules for naming
property getters and setters.  Besides the default naming patterns
(getFoo() and setFoo()), there *is* a way to tell JavaBeans that your
property names are something different -- and if you do this, Struts will
find them.  The burden is now back on you to actually do it.

Hint 1:  Get the JavaBeans spec:  http://java.sun.com/products/javabeans/

Hint 2:  Implement a BeanInfo class associated with your bean.

Craig


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message