tapestry-dev@jakarta.apache.org
[Top] [All Lists]

[DISCUSS] Remove initialize()

Subject: [DISCUSS] Remove initialize()
From: Howard Lewis Ship
Date: Wed, 27 Jul 2005 19:10:16 -0400
The method initialize() is invoked from AbstractPage's default (no
arguments) constructor.

This is truly problematic.  It dates back to an earlier time in
Tapestry's life, before runtime code generation took care of
initializing and re-initializing properties.

It causes a major headache for me ... it means that you can't easily
mock a page the way you can mock an component (using EasyMock and the
EasyMock class extension).  EasyMock trips over the initialize() call
from the default constructor.  This actually happened to me when I was
trying to demonstrate EasyMock and testing for Tapestry at a client.

I would like to eliminate this method now, rather than wait for 4.1 (I
marked it as deprecated sometime during 4.0). Doing so will allow us
to document the proper Tapestry testing story for pages, not just
components.

-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: tapestry-dev-help@xxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>