cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: [RT] A Unified Environment Model?
Date Thu, 03 Mar 2005 14:22:01 GMT
Vadim Gritsenko wrote:

> Daniel Fagerstrom wrote:
>
>> The important thing for the "modules" is to provide script friendly 
>> access of environment data in a simple way. I assumed that the 
>> easiest way would be to support "POJO" interfaces with get and set 
>> methods and Maps so that it would be easy to use for the reflection 
>> parts of ELs and scripting languages, but I don't know that much 
>> about it.
>
>
> You may want to look at:
> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html

>
>
> Basically, what they did, they abstracted out servlet API:
>   request.getParameter()
>   request.getAttribute()
>   request.getSession().getAttribute()
>   ...
>
> Into POJO / Maps, EL friendly interface:
>
>   context.getRequestParameterMap()
>   context.getRequestMap()
>   context.getSessionMap()
>   context.getApplicationMap()
>
> Having something like that (parameters/attributes access via maps) in 
> Cocoon environment probably is not a bad idea.

You mean that we should add such methods in o.a.c.environment.Request, 
Session etc? Yes, that seem to be a good idea, then we don't need any 
Servlet API specific code for the script friendly embeding.

/Daniel



Mime
View raw message