The problem is that x is a JavaScript wrapper of a HashSet. Jexl's special size() function only support collections and arrays. Perhaps that can be fixed by unwrapping NativeJavaObject's before adding them to the Jexl context.
If this solves the problem, I'm +1 for it. However, why doesn't ${x.size()} work? Is this because "size" is a reserved keyword in JEXL?
Ugo
