cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: [PROPOSAL] Continuation in objectModel, Was: Discussion of Flow Issues
Date Mon, 17 Mar 2003 15:42:16 GMT
Vadim Gritsenko wrote:
> Christopher Oliver wrote:
> You may discourage usage of these objects for the sake of perfectness of 
> the MVC in the documentation but I don't think you should insist on 
> disabling access to them (like in FlowVelocityGenerator).
> 
> Fair?
> 
> 
> Vadim
> 
> 

I think you're right.

JSTL seems to take the approach of exposing session, request, and 
application properties as "implicit objects" in its expression language.

"The JSTL expression language defines a set of implicit objects:

     * pageContext - the PageContext object
     * pageScope - a Map that maps page-scoped attribute names to their 
values
     * requestScope - a Map that maps request-scoped attribute names to 
their values
     * sessionScope - a Map that maps session-scoped attribute names to 
their values
     * applicationScope - a Map that maps application-scoped attribute 
names to their values
     * param - a Map that maps parameter names to a single String 
parameter value (obtained by calling ServletRequest.getParameter(String))
     * paramValues - a Map that maps parameter names to a String[ ] of 
all values for that parameter (obtained by calling 
ServletRequest.getParameterValues(String))
     * header - a Map that maps header names to a single String header 
value (obtained by calling ServletRequest.getheader(String))
     * headerValues - a Map that maps header names to a String[ ] of all 
values for that parameter (obtained by calling 
ServletRequest.getHeaders(String))
     * cookie - a Map that maps cookie names to a single Cookie 
(obtained by calling HttpServletRequest.getCookie(String))
     * initParam - a Map that maps a parameter names to a single String 
parameter value (obtained by calling 
ServletRequest.getInitParameter(String))

When an expression references one of these objects by name, the 
appropriate object is returned instead of the corresponding attribute. 
For example: ${pageContext} returns the PageContext object, even if 
there is an existing pageContext attribute containing some other value."


So, do you think the same can be done with the elements of the object model?

Regards,

Chris


Mime
View raw message