You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Yip <yi...@ICG.com> on 2005/04/12 20:52:35 UTC

Is it Possible To Get Propety from within the Global Object

Is it possible to get property defined in the .application from within
the Global Object?   
 
Since the instantiation of the Global object is done by the framework
with a no argument constructor, I want to find a way to create Global
with some initial properties.  I tried the createGlobal() via the my own
Engine. The problem is when the Home page has reference to a Global
object property ,   it is already too late.
 
Here  is what I hope to achive:
Put global property in the .application and have the property initialize
the Global object.
 
Any suggestion is greatly appreciated.
 

Re: Is it Possible To Get Propety from within the Global Object

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Apr 12, 2005, at 2:52 PM, Patrick Yip wrote:
> Is it possible to get property defined in the .application from within
> the Global Object?

Only via the method you mentioned, passing it in from a 
CustomEngine.createGlobal() method.

> Since the instantiation of the Global object is done by the framework
> with a no argument constructor, I want to find a way to create Global
> with some initial properties.  I tried the createGlobal() via the my 
> own
> Engine. The problem is when the Home page has reference to a Global
> object property ,   it is already too late.

I don't understand what you mean by the Home page having a reference to 
Global.  You get Global from calling getGlobal() and that in turn would 
call createGlobal() if it has not already been created.

> Here  is what I hope to achive:
> Put global property in the .application and have the property 
> initialize
> the Global object.

I've done this very thing in several applications.

What is the issue you're having with the Home page?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org