Upon further reflection of my division design issue, instead of getting
the division via the engines, I realize that it is even better to have
the division stored in the Global object so that it can be shared by all
sessions.
How should I access the property in the .application via the Global
object?
I would initially think that I'll need to get it from the Global
object's constructor when it is first created by the framework. Anyone
has done this before? And what is the best way to do this?
Many thanks,
-----Original Message-----
From: Patrick Yip
Sent: Thursday, April 07, 2005 4:26 PM
To: Tapestry users
Subject: RE: Access Property Defined in .application
Ok...I drilled down deeper into the API and found this to work:
My .application has a custom property:
<property name="division" value="1"/>
In the engine I can now get the division from .application via this
call:
division =
context.getServlet().getApplicationSpecification().getProperty("division
");
Then just add the getter method and that's it.
I like to post it here in case someone has a need for it.
Tap! Tap! Tap!
Patrick ^^
-----Original Message-----
From: Patrick Yip
Sent: Thursday, April 07, 2005 2:55 PM
To: Tapestry users
Subject: Access Property Defined in .application
I have a need to define a startup property such as Division ID so that
the same Tapestry application can be used for different divisions of the
company.
Then based on the division ID, the site dynamically display information
based on the divisional settings in the database.
How should I access the property from my Engine class which I extended
from the Base class?
Is the .application file the right place to store this type of global
parameters?
Many thanks,
Patrick Yip
Director of Software Development
International Computer Graphics, Inc.
626-923-1133 ext.241
www.icg.com <http://www.icg.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]