Thanks for all the help!
>>> Jon Stevens <[EMAIL PROTECTED]> 02/15/01 12:59 PM >>>
on 2/15/01 3:07 AM, "Ethan Adams" <[EMAIL PROTECTED]> wrote:
> I'm not sure if my title fits this question but here it goes...
>
> I want to be able to access a variable, let's say $appVersion, from all my
> screens and layouts without having to explicity set it in all my screen
> classes.
>
> I figured I could put it in a properties file...Now how would I get access to
> it in my *.vm files? Do extend the VelocityScreen class and add it there?
>
> I am new to Turbine and want to make sure I doing things the most efficient
> way.
>
> Thanks!
Hi Ethan,
Welcome!
The correct way is to use the Pull Service. I'm sorry that it isn't better
documented on the website, but it is pretty well documented in the Javadoc.
org.apache.turbine.services.pull
You can also create your own Page level objects that would then be
per-request instead of app-context by simply defining your own Page class
and telling the TR.props file to use that one instead...@see:
http://scarab.tigris.org/source/browse/scarab/src/java/org/tigris/scarab/pa
ges/
<>
thanks,
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/> && <http://java.apache.org/turbine/>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]