Hi all,
Wrapping VelocityContext as the ScriptContext in JSR 223 seems not possible
as the intended behavior of each implementation is
quite different. Because VelocityContext is more like expected to behave as
a Map with having additional ability to have an inner context and etc.

So this VelocityContext is very much in to the behavior of
javax.script.Binding which is exactly a Map like behavior.
I think best way is to use it in that context. But still VelocityContext
has limited number of methods covers in a Map while Bindings interface
directly extends java.util.Map.

So what is the best way to accomplish this Bindings concept. But of course
we should not extend the VelocityContext behavior to go close with Bindings.
Shall we just wrap the VelocityBindings class with a Map object. And in the
VelocityScriptEngine, internally we can use(we have to) the velocity
context for evaluation methods.

What do you think ?

-- 
Thanks
/Dishara

Reply via email to