So is this a foolproof (excluding sufficiently talented fools)
way to upgrade use of this feature from T3 to T4?

If that's the case, then it IS confusing, and should go.
Even if I had used it, I would be of this opinion, though
because of the confusion surrounding it, I never have.

Cheers,
Nick.


Howard Lewis Ship wrote:
The correct approach is to use finishLoad().  If you set a property
inside finishLoad() it becomes the default value for that property
(the value is stored in an instance variable and used to re-initialize
the property value in later requests).

Altenrately, you can implement PageAttachListener and/or
PageDetachListener to set the value when the page is attached to the
request, or clear the value when the page is detached from the request
(and returned to the page pool).

On 7/27/05, Jamie Orchard-Hays <[EMAIL PROTECTED]> wrote:

Rather than just make it deprecated now?

Seems that this would break a lot of migrating code. Say I have code
using initialize(). What's the easiest way to migrate this?

Jamie


On Jul 27, 2005, at 7:10 PM, Howard Lewis Ship wrote:


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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






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

Reply via email to