You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris Joelly <ch...@unycom.com> on 2004/07/22 12:28:15 UTC

pull tool SessionData

Hello!

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...)

thx, Chris

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Der Mensch ist das einzige Tier, das arbeiten muß.
		-- Immanuel Kant


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


Re: pull tool SessionData

Posted by Chris Joelly <ch...@unycom.com>.
Hello!

Am Fri, Jul 23, 2004 at 10:27:15AM +1000, Scott Eade meinte:
> Chris Joelly wrote:
> 
> >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.

How do i use SessionData ?

thx, Chris

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

Der schönen Aktrice rechnet man immer ein wenig den Geist ihrer Rolle
zu ihrem.
		-- Jean Paul


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


Re: pull tool SessionData

Posted by Scott Eade <se...@backstagetech.com.au>.
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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org