On Tue, 2004-04-27 at 23:35, Sylvain Wallez wrote:
<snip/> 
> I was about to propose to not only remove FormContext from validate 
> (it's useless), but also to remove FormContext completely.

ok, one step at a time: so it's ok to remove FormContext from
WidgetValidator right now?

> Don't yell at me right now. Read on ;-)
> 
> Remember those discussions we had last august about request adapters [1] 
> which turned out to be actually environment adapters [2]? Using a 
> LocaleAdapter would allow us to finally use *the* location where we 
> naturally can get it: request.getLocale().
> 
> It's just a matter of writing a RequestWrapper that returns the locale 
> accordingly to the browser/cookie/session-attr scheme we have today, and 
> we can stop worrying about these locale that have to be passed around in 
> the code and these {lang} everywhere in the sitemap.
> 
> WDYT?

In general, I think it would be a good thing to have one place to get
the locale from. I'm not sure yet how these request adapaters would
work, eg would it be needed to do instanceof checks on the Request
object to see if it is a "LocalizedRequest" or something?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]

Reply via email to