Take a look at this forum thread:
http://forum.springframework.org/viewtopic.php?p=4765
I think it does add some value to allow MessageSourceAccessor to pull
the default locale for the methods where the locale is not specified,
from a ThreadLocal variable, instead of always using the default locale
that was specified on construction. This would allow people to use an
interceptor to set the current Locale as a ThreadLocal, and then any
controller code would not have to worry about handling the current
locale. Currently view code does not have to worry about locale
handling, nor does controller code which deals only with the
BindException ('errors') instance, but any other controller code has to
do a RequestContextUtils.getLocale() call to manually get and use the
locale. Additionally, any other objects that extend from
ApplicationObjectSupport and use the supplied MessageSourceAccessor have
to get the locale from somewhere (not-determined) if they want to
override the default locale...
What do you guys think?
Colin
|