You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dion Gillard <di...@gmail.com> on 2004/08/23 03:07:43 UTC

JEXL and Expression Resolvers

I'm just doing the documentation for JEXL to get it ready for a
release, and as part of the examples wanted to show why you would use
a custom expression resolver.

The class provided in JEXL, FlatResolver, is fairly trivial, and I
don't think it works as advertised in the javadoc (you could resolve
ant-ish properties (foo.bar.woogie) using this).

The flat resolver looks for the provided *expression* in the context,
and is not a 'Variable Resolver', so expressions like "foo.bar.woogie
+ 2" where "foo.bar.woogie" is a variable in the context don't get
resolved as expected. For flat resolver to work, "foo.bar.woogie + 2"
would need to be in the context.

It seems the point of the pre and post resolvers is to allow other
expression resolvers a go at the entire expression, rather than at
variables within it, e.g. allow another EL to do the work before or
after JEXL gets a go.

Is this close?
-- 
http://www.multitask.com.au/people/dion/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org