struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Puchko" <taras.puc...@gmail.com>
Subject Re: No getter method for property
Date Wed, 31 Jan 2007 13:47:22 GMT
Hi,

I think Struts is confused to see a simple and an indexed property
with the same name. If you have an indexed property, your methods
should look like this:

String getNombre(int)
void setNombre(int, String)
String[] getNombre()
setNombre(String[])

See http://java.sun.com/docs/books/tutorial/javabeans/properties/indexed.html

Regards,
Taras



On 1/31/07, Agustín <agustin.gonzalez@treelogic.com> wrote:
> If I only have two methods the application runs perfectly:
>
> getNombre()
> setNombre(String)
>
> If I have four methods the applications not runs.
>
>
> getNombre()
> setNombre(String)
>
> getNombre(int)
> setNombre(int, String)
>
> I don't know why the application runs on one server (on localhost) and not
> runs on other server (on other host).
>
> Agustín González García
> -------------------------------------
> Mantenimiento J2EE - Treelogic
> Tel: 985 73 27 32
> Edificio Centroastur, 2ª planta
> Polígono SIA Copper
> 33420, Lugones - Asturias - España
> ----- Original Message -----
> From: "Dave Newton" <newton.dave@yahoo.com>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Wednesday, January 31, 2007 1:14 PM
> Subject: Re: No getter method for property
>
>
> > --- Agustín <agustin.gonzalez@treelogic.com> wrote:
> >> I have the get and set method fot the property
> >> nombre, but I have more than one method. I have:
> >>
> >> getNombre()
> >> getNombre(int)
> >> setNombre()
> >> setNombre(int)
> >
> > I'm not sure that this is a legal JavaBean; does it
> > work if you remove one set of accessors? (And no, I
> > don't know why it works on one server and not another
> > :)
> >
> > Dave
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Want to start your own business?
> > Learn how on Yahoo! Small Business.
> > http://smallbusiness.yahoo.com/r-index
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Mime
View raw message