Ugo Cei wrote:What was your expression?
org.apache.commons.jxpath.JXPathException: Cannot invoke public final java.lang.String java.text.Format.format(java.lang.Object); Cannot format given Object as a Date
More info: printing #{getClass(myXPathExpressionThatShouldPointToADate)} yelds:
class org.apache.commons.jxpath.ri.EvalContext$SimpleNodeSet
Baffled,
Ugo
By the way JXTemplateGenerator adds the capability to call Java constructors to Jexl, so you can also do this:
<jx:out value='${java.text.SimpleDateFormat("dd/MM/yyyy").format(someDate)}'/>
As in JavaScript, classes in packages other than "java" are under the "Packages" property, for example:
<jx:out value='${Packages.com.xyz.text.MyClass(blah).someMethod(blah)}'/> is equivalent to:
new com.xyz.myClass(blah).someMethod(blah);
Chris
