Yes, decorating didn't seem possible - so have (for now) copied and overridden PersistentLocaleImpl to allow null.
It is part of a requirement to always force locale through uri, except for english which is on unlocalized. So need to clear persistentlocale when switching to english. Locale switch also set's cookie, so preferred locale is remembered(redirect). Approach is similar to how aws locale resolution works, http://aws.amazon.com/ . Have also replaced and overridden PageRender/- and ComponentEventDispatchers to insert locale resolution logic in between decoding of request parameters and it's delegation to request handler. Seems to work, but let me know if someone can think of a more elegant solution. /magnus On Tue, Dec 17, 2013 at 9:03 PM, Lance Java <lance.j...@googlemail.com>wrote: > I'm surprised that PersistentLocale does not have the ability to clear the > value once it's set. Looking at PersistentLocaleImpl it doesn't allow > setting to null. > > Perhaps you could override / decorate PersistentLocale to support clearing > the value (by setting null). > > If decorating, you'll likely require a PerThreadValue. If overriding, > you'll likely copy / paste / tweak PersistentLocaleImpl. >