You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Artur W." <a_...@gazeta.pl> on 2007/09/24 16:24:07 UTC
Global variables
Hi!
Where should I put global variables that are not related to the user but to
the application.
In JSP I've used servletContext.setAttribute
How to do this in Wicket?
Thanks,
Artur
--
View this message in context: http://www.nabble.com/Global-variables-tf4509527.html#a12860998
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Global variables
Posted by Jonathan Locke <jo...@gmail.com>.
yes, these may belong in your WebApplication subclass.
however, you may want to be careful to separate your
/web/ application from your /application/ (to keep details
of your web tier isolated). for example, at my work, we
have both a WebApplication subclass that contains a
variety of things related to our web application AND a
separate application class that holds values that are
global to the whole project and have nothing at all to
do with Wicket. in time, you can end up with multiple
WebApplications, so it's a good idea to think this through.
Eelco Hillenius wrote:
>
> On 9/24/07, Thies Edeling <th...@rrm.net> wrote:
>> Why not just add them to your Application class?
>
> Yep, that's what you should do. If what you want to achieve is
> specific for one application, put them as members in your application
> class, or if you need something more generic, you can use
> Application's meta data facility (get/setMetaData).
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Global-variables-tf4509527.html#a12870159
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Global variables
Posted by Eelco Hillenius <ee...@gmail.com>.
On 9/24/07, Thies Edeling <th...@rrm.net> wrote:
> Why not just add them to your Application class?
Yep, that's what you should do. If what you want to achieve is
specific for one application, put them as members in your application
class, or if you need something more generic, you can use
Application's meta data facility (get/setMetaData).
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Global variables
Posted by Thies Edeling <th...@rrm.net>.
Why not just add them to your Application class?
Jan Kriesten wrote:
> hi artur,
>
>
>> Where should I put global variables that are not related to the user but to
>> the application.
>> In JSP I've used servletContext.setAttribute
>>
>> How to do this in Wicket?
>>
>
> you can do that in your application:
>
> getServletContext().setAttribute( name, value );
>
> regards, --- jan.
>
>
> --------------------------------------------------
> sign of renitence gmbH & co. kg
> Büro Hamburg
> Kelterstr. 23
> D-22391 Hamburg
> Germany
>
> fon +49-40-27805130
> fax +49-40-27805131
>
> www.renitence.de
> www.webnix.de
> www.projektnix.de
>
> Geschäftsleitung
> Jörg Schmidt-Stein
> Susanne Stein
> Jan Kriesten
>
> Gerichtsstand Nürnberg
> hr a 12518
>
> USt.-IdNr.: DE194293429
> St.-Nr. 238 174 01201
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
http://www.ehour.nl/
http://blog.ehour.nl/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Global variables
Posted by Jan Kriesten <ja...@renitence.de>.
hi artur,
> Where should I put global variables that are not related to the user but to
> the application.
> In JSP I've used servletContext.setAttribute
>
> How to do this in Wicket?
you can do that in your application:
getServletContext().setAttribute( name, value );
regards, --- jan.
--------------------------------------------------
sign of renitence gmbH & co. kg
Büro Hamburg
Kelterstr. 23
D-22391 Hamburg
Germany
fon +49-40-27805130
fax +49-40-27805131
www.renitence.de
www.webnix.de
www.projektnix.de
Geschäftsleitung
Jörg Schmidt-Stein
Susanne Stein
Jan Kriesten
Gerichtsstand Nürnberg
hr a 12518
USt.-IdNr.: DE194293429
St.-Nr. 238 174 01201
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org