You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Keith Seim <ke...@kjsdesigns.com> on 2003/06/30 13:44:07 UTC
keeping track of variables
My site is essentially a tree structure of pages - as the user
progresses further down they access more specialized content - and most
progress through the tree results in adding a variable to the already
existing stack.
From my previous programming experience, I expect I should handle these
variable by inserting them into page.getSession() (as well as context
for the template designer to use)... I couldn't find anything
descriptive on this in the howtos... any ideas before I start filling up
session?
Thanks
___________________________________
Keith Seim • http://kjsdesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: keeping track of variables
Posted by Keith Seim <ke...@kjsdesigns.com>.
Thanks both Fabio and Scott. Both solutions are useful, just wanted to
make sure I wasn't running myself into a brick wall :)
Cheers
Keith
On Monday, June 30, 2003, at 09:08 AM, Fabio Daprile wrote:
> Hello Keith,
>
> here a short example:
>
> public void doBuildTemplate( RunData data, Context context )
> {
> ParameterParser _formParams;
> HttpSession _session;
>
> if (super.isLoggedIn(data))
> {
> _formParams = data.getParameters();
> _session = data.getSession();
> _session.setAttribute("myUser", _myuser);
>
> _session.getAttribute("myUser");
>
> you can also call this session from velocity templates.
>
> hope this helps
>
> greetings
>
> Fabio Daprile
>
>
> Keith Seim wrote:
>
>> My site is essentially a tree structure of pages - as the user
>> progresses further down they access more specialized content - and
>> most progress through the tree results in adding a variable to the
>> already existing stack.
>>
>> From my previous programming experience, I expect I should handle
>> these variable by inserting them into page.getSession() (as well as
>> context for the template designer to use)... I couldn't find anything
>> descriptive on this in the howtos... any ideas before I start filling
>> up session?
>>
>> Thanks
___________________________________
Keith Seim • http://kjsdesigns.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>
>
> -- ************************************
> Würth Phoenix S.r.l.
> Fabio Daprile
>
> Via Kravogl 4
> I-39100 Bolzano
> Phone: +39 0471 564111 (direct 564066)
> Fax: +39 0471 564122
> mailto:fabio.daprile@wuerth-phoenix.com
> http:// www.wuerth-phoenix.com
> *************************************
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: keeping track of variables
Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello Keith,
here a short example:
public void doBuildTemplate( RunData data, Context context )
{
ParameterParser _formParams;
HttpSession _session;
if (super.isLoggedIn(data))
{
_formParams = data.getParameters();
_session = data.getSession();
_session.setAttribute("myUser", _myuser);
_session.getAttribute("myUser");
you can also call this session from velocity templates.
hope this helps
greetings
Fabio Daprile
Keith Seim wrote:
> My site is essentially a tree structure of pages - as the user
> progresses further down they access more specialized content - and
> most progress through the tree results in adding a variable to the
> already existing stack.
>
> From my previous programming experience, I expect I should handle
> these variable by inserting them into page.getSession() (as well as
> context for the template designer to use)... I couldn't find anything
> descriptive on this in the howtos... any ideas before I start filling
> up session?
>
> Thanks
> ___________________________________
> Keith Seim • http://kjsdesigns.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
--
************************************
Würth Phoenix S.r.l.
Fabio Daprile
Via Kravogl 4
I-39100 Bolzano
Phone: +39 0471 564111 (direct 564066)
Fax: +39 0471 564122
mailto:fabio.daprile@wuerth-phoenix.com
http:// www.wuerth-phoenix.com
*************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: keeping track of variables
Posted by Scott Eade <se...@backstagetech.com.au>.
Keith Seim wrote:
> From my previous programming experience, I expect I should handle
> these variable by inserting them into page.getSession() (as well as
> context for the template designer to use)... I couldn't find anything
> descriptive on this in the howtos... any ideas before I start filling
> up session?
Look at data.getUser().setTemp()/getTemp(). Ultimately
this is just a convenient way of putting the data in the
session.
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