On 6/18/06, Mike Sparr - www.goomzee.com <[EMAIL PROTECTED]> wrote:
Hi Rahul,

Thanks for the detailed response.  I found that the build succeeds but for
some reason, I lose the target declaration of the send tag in ctx params
(JEXL).  Still debugging.  With the JEXLEvaluator I get null response.  By
replacing with the original  ELEvaluator I get text strings but no
transform.
<snip/>

There are subtle differences you need to be aware of, especially in
the realm of Strings and String constants (note single quotes in JEXL
for String constants etc.) -- best way to understand that is probably
to compare and constrast the EL and JEXL microwave examples (long,
possibly fragmented, URLs):

http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jsp/microwave-01.xml

vs.

http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml



Do you recall any threads that gave FunctionMapper examples?
<snap/>

We discussed it before, but I don't recollect any code examples. In
any case, the EL FunctionMapper interface is simple, with one method:

Method resolveFunction(String prefix, String localName);

Impl looks like:

public Method resolveFunction(String prefix, String localName) {

  if (prefix != null
     && prefix.equals("foo")
     && localName.equals("bar")) {

       // return Method that you want to Map to
       // foo:bar(some arguments)
       // should be static method of some class
  }

  // and so on for other functions ...

  // finally, method not found?
  return null;
}

You will get ready-made impls for most String manipulation functions
out of the JSTL impl in use.



I'll continue debugging to find out how to get everything working with new
code-base and would appreciate any steer on making the above possible.
Which Evaluator should I use (as I'm making changes now) Commons EL or JEXL.

<snip/>

EL, for reasons such as:

* You are in a servlet container domain, EL is possibly all around
(and JEXL is possibly foreign)
* You have an existing system that works with EL
* String manipulation is easier with EL, IMO

-Rahul


Cheers,


Mike

<snap/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to