struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Crossley <jcross...@ifleet.com>
Subject Re: AW: struts get and set methods in formbeans
Date Tue, 26 Mar 2002 15:10:24 GMT
I don't think that's correct.  As long as you refer to the "password"
property in your JSP, you may use getPassword/setPassword, regardless
of the name of the data member they encapsulate.

In other words, it's not the name of the private data member that
determines the names of your public accessors.  It's the name used in
your JSP's.

-- Jim

Oliver Reflé <o.refle@gmx.de> writes:

> Yes it has to be the same, if you have "test" you have to implement
> getTest() and setTest()
> 
> -----Ursprüngliche Nachricht-----
> Von: Jose Casas [mailto:Jose.Casas@wal-mart.com]
> Gesendet: Dienstag, 26. März 2002 15:42
> An: 'Struts Users Mailing List'
> Betreff: struts get and set methods in formbeans
> 
> 
> Hello,
> 
> I got a question about the get and set methods in the form beans.  Does the
> get or set method need to have the name of the member variable in it?
> For example, if I have a member variable named userPassword do I have to
> have a get/set method called getuserPassword/setuserPassword or can I put
> getPassword/setPassword.  I guess what I'm asking is does the variable have
> to appear exactly the same in the get/set method.
> 
> Thank you.
> 
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidential
> and intended solely for the individual or entity to
> whom they are addressed.  If you have received this email
> in error destroy it immediately.
> **********************************************************************
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>

--
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