cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
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:
><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?
>  
>

+1.

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

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

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message