Oscar Westra van Holthe - Kind vient de nous annoncer : > On 24-09-2009 at 16:45, Lionel wrote: >> Hi all ! >> >> I would like to set the user locale as a thread local variable from an >> interceptor (based on the user account) and get this value from a custom >> LocalePicker. >> But it seems that the LocalePicker.getLocale() is called before >> interceptors. >> Is there some way to configurer the execution order to have muy interceptor >> called before the LocalePicker ? > > No. But you can do the following: > 1. Create a custom ActionBeanContext that retreives the user account > information based on either request.getUserPrincipal(), other request > data, or the session. Put your variable in a request attribute. > Configure the StripesFilter to use this class directly or put it in an > extension package. > 2. Create a custom LocalePicker (subclass the DefaultLocalePicker for > example). It get's the request, so you can access your variable to > determine the locale to use. > Configuration is analogous to point 1. > > > Oscar
Late answer, but I faced the same issue with a new application. The Locale is in dabatabse on the user, but I can't load the user as Stripersist is not initialized yet when MyLocalePicker is called... ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users