I just discovered the new JUEL engine. Great!
Unfortunately, JUEL 2.1.0-rc2 contains a stupid bug which also affects the engine.
In JuelScriptEngine.toELContext(...) the default constructor of SimpleResolver
is used to create the EL resolver. This constructor automatically creates a
chain of delegates to resolve bean properties, array elements, mappled values, etc.
Unfortunately, the resolver to handle list elements is missing here! This means,
that you won't be able to evaluate $
, if variable 'list' refers to a
To fix this, either wait for the next JUEL release and replace the jar or -
which I would prefer - create the chain of resolver delegates by hand:
CompositeELResolver chain = new CompositeELResolver();
chain.add(new ListELResolver()); // !!!
ELResolver resolver = new SimpleResolver(chain);