Rob Berens wrote:
----- Original Message ----- From: "Mark Lundquist" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 28, 2005 10:09 AM
Subject: Re: [JXTemplate] expression is not evaluated?



Yes — it's because inside '${}', the language is JExL, and you are
trying to treat it as Java.  The meaning of:

${java.util.Date()}

is "take the result of calling the method named 'Date' of the property
named 'util' of the object named 'java' in my context".  JExL doesn't
know about constructors nor about the Java package syntax.



I can write

<jx:set var="myList" value="${java.util.List()}"/>

which works fine in 2.1.8. Also you can use Packages to write something like

${Packages.com.myCompany.myPackage.myClass(myParameter1, myParameter2)}

This works because the JXTG adds "java" and "Packages" to the Jexl context,
which are variables of the class org.mozilla.javascript.NativeJavaPackage.

So it's not a Jexl problem.
This feature is only enabled if you are calling JX from flow.


--
Leszek Gawron                                      [EMAIL PROTECTED]
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Reply via email to