struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emilia Ipate" <eip...@nl.swets.com>
Subject RE: javabeans explanation
Date Mon, 05 Jun 2006 14:32:37 GMT
That is true, but my question is: why does it have to be the same?

-----Original Message-----
From: Jorge Martín Cuervo [mailto:jorge.martin@defactops.com] 
Sent: maandag 5 juni 2006 16:25
To: Struts Users Mailing List
Subject: Re: javabeans explanation


i think the types must be the same
choose:


public int getAge()
public void setAge(int age)

or

public Age getAge()
public void setAge(Age age)



despite this, in actionform you should use only String values. With String values you can
store wrong int values that user entered, but with int values you can't.


El lun, 05 de 06 de 2006 a las 16:25, Emilia Ipate escribió:

> Hello, all!
>  
> I have a question:
> why if I have in a ActionForm these 2 methods:
>     public Age getAge();
>     public void setAge(int age);
> (note that I do not have a property age in the form, because I do a
> delegation)
> and I receive the request parameter "age", why does it not work??? I 
> acts as if it does not see the setter method!
>  
> I think it is related to introspection/reflection, but I can't figure 
> out how! if anyone has any ideas, please help!
>  
>  
> Kind regards,
> Emilia
>  
> 
> ______________________________________________________________________
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

-- 
;-)
____________________________________
Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email <jorge.martin@defactops.com>
voz +34 985 129 820
voz +34 660 026 384
____________________________________

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


Mime
View raw message