Yes, though it would not be the same as data for an application scope as you can have more than one Wicket application in your actual web application/ class loader. And you know... static is the root of all evil :)
The Application class is meant for anything that has the application scope, so that's a good match here. Eelco On 8/23/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote: > Oops. Sorry about that. I must have misunderstood what WebSession was used > for. Although, if you used the WebSession, would it not be the same for all > sessions if you were loading the same static data? Is WebSession not used > as something similar to regular HttpSession when dealing with J2EE? > > Gregg > > > On 8/22/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > Using WebSession (which does not extend HttpSession btw, and might use > > e.g. a database instead of HttpSession as it's store) would work for > > stuff that is really related to a single session. If you want to load > > data that's the same for all sessions, the WebApplication object is > > fine. > > > > I'm still not sure whether it is a good idea to have such a map by > > default. I can see the convenience in it, but on the other hand, it > > undermines the strongly typed approach we usually prefer. Yes, it > > would mean casting more, but you could quite easily hide that in for > > example a base page. > > > > Eelco > > > > On 8/23/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote: > > > Why not use a subclass of WebSession (HttpSession) and store all lists > in > > > there. > > > > > > Gregg > > > > > > On 8/19/05, Koen Serry > <[EMAIL PROTECTED] > > > > wrote: > > > > But this requires doing a cast of the WebApplication to your Subclass > in > > > every page/component level. I guess this relates to the thread on spring > > > integration. > > > > > > > > Koen > > > > > > > > > > > > Igor Vaynberg wrote: > > > > You should keep this data in your subclass of the WebApplication > object. > > > You > > > > should probably populate this data by overriding WebApplication.init() > or > > > > lazy-load it upon first access if you need to do this inside > requestcycle. > > > > > > > > > > > > -Igor > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: [EMAIL PROTECTED] > > > > > > > > [mailto:[EMAIL PROTECTED] ] On > > > Behalf Of > > > > Chris Long > > > > Sent: Friday, August 19, 2005 3:34 PM > > > > > > > > To: [email protected] > > > > Subject: [Wicket-user] Storing Global Data > > > > > > > > > > > > Hi, > > > > > > > > I'm looking to load lists at application start from a > > > > database to be used in forms across the application. For > > > > example, a list of countries and provinces to populate drop > > > > downs. How would I go about doing this or is there another > > > > > > > > better way of doing it? > > > > > > > > Thanks, > > > > > > > > Chris > > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net email is Sponsored by the Better Software Conference & > > > > EXPO September 19-22, 2005 * San Francisco, CA * Development > > > > > > > > Lifecycle Practices Agile & Plan-Driven Development * > > > > Managing Projects & Teams * Testing & QA Security * Process > > > > Improvement & Measurement * > > > > http://www.sqe.com/bsce5sf > > > > _______________________________________________ > > > > Wicket-user mailing list > > > > > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > > Practices > > > > > > > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > > > > Security * Process Improvement & Measurement * > > > > http://www.sqe.com/bsce5sf > > > > _______________________________________________ > > > > Wicket-user mailing list > > > > > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > > _______________________________________________ > > Wicket-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
