You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by James Strachan <ja...@yahoo.co.uk> on 2002/09/04 19:13:54 UTC

Re: [Jelly] Scopes, contexts and implicit objects

Hey Martin

From: "Martin Cooper" <ma...@tumbleweed.com>
> I'm working on adding pluggable scopes to Jelly (per the JIRA bug report),
> and have some of this figured out and implemented.

Great stuff!

> Regarding the Scope interface outlined in the JIRA report, I have added
> removeVariable() and getVariableNames(), for parity with the Servlet
> interface, and implemented Scope classes for request, session and
> application.

Cool!

> There are some areas, though, where I'm a little unsure of which way to
go.
>
> 1) Currently, JellyContext.getVariable() actually invokes findVariable()
to
> search parent contexts, if they are inheritable. This seems to conflict
with
> the corresponding Servlet methods, where get*() references only the
current
> context, while find*() allows a search up through parent contexts.

Agreed - I think getVariable() should not be calling findVariable(). It
could have been a hack someone put in - we should take it out again.


> 2) Certain "scopes" seem to be currently dealt with as explicit variables
by
> themselves. For example, "context" and "systemScope" seem to be handled as
> variable prefixes.

This is how JSTL approaches the problem too, so we should do the same so
that expression work in Jelly and JSP/JSTL..

http://www.xent.com/FoRK-archive/sept99/0260.html

Incidentally maybe the Scope interface should be get(String) and set(String,
Object) then Jexl will automatically allow

$session.username

if 'session' is a Scope?

James
-------
http://radio.weblogs.com/0112098/


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>