You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nenko Ivanov <ni...@icygen.com> on 2004/04/27 16:22:53 UTC
Access session based tool instance in my screens and actions question?
Hi all,
I want to have session tool that holds for example the current language.
But I do not know how to access the session instance of this tool and obtain
current language in my VelocityScreen or VelocityAction based class. Is it
possible.?
And if it is, how i must realize this tool?
Thanks all in advance.
Nenko
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Access session based tool instance in my screens and actions question?
Posted by US...@gea-wiegand.de.
Hi Nenko
in your action class methods you get the RunData and the Context object.
>From the Context object you can easily extract your tool:
public void doPerform(RunData data, Context context)
{
Session s = (Session) context.get("session"); // suppose your tool is
named session in the velocity context
....
}
The same works for velocity screens ...
/uwe
"Nenko Ivanov"
<nivanov@icygen.c An: <tu...@jakarta.apache.org>
om> Kopie:
Thema: Access session based tool instance in my screens and actions
27.04.2004 16:22 question?
Bitte antworten
an "Turbine Users
List"
Hi all,
I want to have session tool that holds for example the current language.
But I do not know how to access the session instance of this tool and
obtain
current language in my VelocityScreen or VelocityAction based class. Is it
possible.?
And if it is, how i must realize this tool?
Thanks all in advance.
Nenko
---------------------------------------------------------------------
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