That is a nested expression: The result name is contained in the variable named "key".

UEL does not support nested expressions, but we make it work in FlexibleStringExpander by pre-parsing the String and extracting nested expressions.

In addition, FlexibleMapAccessor contains some code to handle nested expressions (line 66 and 192). So, maybe that code can be improved to be smarter.

-Adrian

On 5/14/2012 10:37 AM, Jacopo Cappellato wrote:
Hi Adrian,

we have noticed that the following instruction:

             <field-to-result field="val" result-name="${key}"/>

(from ContentServices.xml) returns an error in the console:

2012-05-14 14:12:02,679 (default-invoker-Thread-11) [FlexibleMapAccessor.java:163:ERROR] UEL exception 
while setting value: javax.el.ELException: Error parsing '${}': syntax error at position 2, encountered 
'}', 
expected<IDENTIFIER>|<STRING>|<FLOAT>|<INTEGER>|'true'|'false'|'null'|'-'|'!'|'not'|'empty'|'(',
 original = ${key}

However it seems that the value is still returned properly. Any idea of how we 
could fix it?

Thanks,

Jacopo



Reply via email to