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

-- 
   ,-_
  /() ) Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  DRM "manages access" in the same way that a jail "manages freedom".

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to