cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: WidgetValidators: do they need FormContext?
Date Wed, 28 Apr 2004 13:28:14 GMT
Bruno Dumon wrote:

>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?

Nonono!! The purpose of request adapters is to provide the application 
with the correct data transparently. Think of it as ServletFilters 
inside Cocoon.


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message