cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: WidgetValidators: do they need FormContext?
Date Wed, 28 Apr 2004 09:24:23 GMT
On Tue, 2004-04-27 at 23:35, Sylvain Wallez wrote:
> 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.

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                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message