For (1), it sounds to me like you want to put the result of TRIANGLEAREA in a variable in the JexlContext and pass that context into a second JEXL expression?
For (2), you can't (well, you can, but not easily) find the variables in the expression programmatically. However, if you know the variables a priori, you can write a function that takes those variables and puts them into the context. If you don't know them, you can just pass a Map of variables into the context. -----Original Message----- From: Your Name [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 1:54 PM To: [EMAIL PROTECTED] Subject: JEXL Questions Hi I've been checking out JEXL and is very easy to use. I was wondering if I can do the following things: 1.- Define an expression and then reuse that expression as a function. I want to be able to let users configure their own expressions and then reuse them in another expression. Something like this: Function TRIANGLEAREA: (a * b) / 2. Reuse the function: a + TRIANGLEAREA (a, b) + b. 2.- For a particular expression know what variables depend on the expression. I want to be able to expose the expression as a function with parameters. Regards, Nestor Boscan -- NeoMail - http://neomail.sourceforge.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
