Vadim Gritsenko wrote:
Found couple of issues with jxpath template generator:
* #{0 != ''} evaluates to false * #{0 > 1} is not evaluated, as well as #{0 < 1}
There's another issue I have just discovered:
var x = new java.util.HashSet(); cocoon.sendPage("view", { "x" : x });
...
${x.size()} give a syntax error. If I try to do ${size(x)} it complains that the size function isn't applicable to the variable's class.
Ugo
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.
