Chris Joelly wrote:
i want to save some data within my session and want to use the data in
my action classes (VelocityAction). i saw that on every request a new
action object is instantiated so data stored within an action class
is lost between requests to this action class methods.
what is the elegant turbine way of sharing data between calls to methods
of action classes?
can i use SessionData for this task and if so how can i use SessionData
for this?
data.getUser().setTemp() is nice but is there a more comfortable way of
saving data within my session for velocity templates and actions?
and do i have to put data in the velocity context on every request? or is
there a way to put data in the velocity context once for all subsequent
requests? and if i want to change a object in my velocity context i put
it in again? (with null or another object...)
User.Temp is fine. There is also the SessionData service
(*org.apache.turbine.services.pull.util.SessionData) - this is a pull
tool for storing session scope data. Depending on the nature of the
data you might create your own pull tool and make this available in to
your templates.
Scott
*
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]