For those values which should only be init'ed once, why not use
lazy-instantiation?
public Object getMyObject() {
if (myObject == null) {
myObject = new Object();
}
return myObject;
}
Tapestry's contract is that you don't need to worry about the
synchronization of that method since only a single client has access to
a single instance of a page at any given time.
I do this for things like property selection models which won't change
during the lifetime of the page.
Robert
nat wrote:
> Hello!
>
> It seems to me that when I define an initialize() method within a page
> class, the constructor of that class will not be executet, not even
> once. Is it true, or is it just me?
>
> (I need the constructor, becouse I have to set up some special values.
> These values have to be set up only once per page class. And they remain
> constatnt during the rest of the time of the page class. That is why I
> do not want to put them into the initialize(). They do not have to be
> initialize each time the page is loaded.)
>
> Attila
>
> Ps. I am using Tapestry 3.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]