Greg Reddin ha scritto:
I've added a preliminary version of a TilesContext interface and
refactored the core API to use it. .
....
Note that I ran out of time before I had a chance to look at these
other examples, so if you look at what I just committed and inherently
see a better way, please share.
Hi Greg
I am working on an idea that involves Contexts and Scopes (in fact the
product I want to release will be called "Scopes" ;-) ) without being
tied to any framework.
What I created is a "State" that comprises a certain number of
"Contexts" that have a similar API to ServletRequest, HttpSession and
ServletContext (I mean they all have "getAttribute" and "setAttribute"
methods).
"State.getContext(String contextName)" method is used to retrieve the
context, i.e. you can call it such as:
state.getContext("request") to get request context.
The engine creates the State through the use of a serlvet filter and
uses a wrapped HttpServletRequest to deliver it to servlets.
I don't know if it is useful. You know, I wish to publish it with Apache
License on Sourceforge but I still did not register a project for it,
because I wanted to write a bit of docs first. But anyway if you are
interested on it I can post it ASAP.
Anyway I really liked the idea of TilesContext. Just a thought... what
do you think about using it in ComponentDefinitions.getDefinition
methods? I noticed that your TilesContext has a map for headers, that I
use to read for detecting the device....
Ciao
Antonio
P.S. I also managed to add "window" scope but that is another story.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]