On 4/12/2005 08:49, Erik Hatcher wrote:
>> 2. Directly in the Page class, in this case, the page does not need to
>> be abstract. I then have to write my own getter and setter.
> 
> 
> And in this case you also need to clear the values in initialize()
> (which gets called *after* the page is done and is being initialized to
> be put back into the page pool).

So are you saying that if you implement a getter/setter yourself, and
you have instance variables, you have to reset/unset these instance
variables by overriding the initialize() method? I don't remember seeing
that in Howard's book.


> Yes - use <property-specification> and do not use instance variables.

The only way to get at data that is more complicated that a simple
variable like, say, the address from the current person, is to provide
your own getter, right? Or provide a getter to return the person and get
at the address using ognl, which seems a bit sloppy to me.

>>  What do I gain by going with the  <property-specification> ?
> 
> Peace of mind.

I use <property-specification> when I don't need anything other than a
variable, don't care what it's called, etc. But for more complicated
operations, this isn't an option, is it? Am I missing something?

Joey


-- 
When the gun smoke settles, we'll sing a victory tune
 and we'll all meet back at the local saloon...

Jobkabob: http://www.jobkabob.com
Jobkabob News: http://www.jobkabob.com/news

http://www.joeygibson.com/blog
http://www.joeygibson.com/blog/life/Wisdom.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to