OK, I'm reading 
http://java.sun.com/products/jsp/reference/techart/unifiedEL.html
It will be more clear, thank askikng stupid questions :o)

Jacques

From: "Jacques Le Roux" <[email protected]>
From: "Jacques Le Roux" <[email protected]>
Also could {util: syntax deal with stuff like "{bsh:org.ofbiz.*"  (ie replace 
bsh by util there) ?

Mmm, thinking more about (and after a quick look at UelUtil.java and 
UelFunctions.java) I guess it makes no sense to invoke
"util:" in these cases.
But would a simple syntax (without "util:" ie simply removing "bsh:") not 
possible (I guess it's not possible right now, but could
it be ?)
I believe we can't nor yet replace "bsh:" "by "grovvy:", I'm wrong ?

The idea behing all theses questions is to slowly get rid of BeanShell 
everywhere (since not maintained anymore)

Thanks

Jacques

This would allow to replace most of bsh uses in xml files

Thanks

Jacques

From: "Jacques Le Roux" <[email protected]>
Hi Adrian,

Is {util: syntax also dealing with ternary operator (did not look into details, 
doing some {bsh: to {util: changes while
changing(/adding) type from "Double" to "BigDecimal" as David suggested recently

Thanks

Jacques

From: "Adrian Crum" <[email protected]>
Now that we have the Unified Expression Language implemented in 
FlexibleStringExpander, we gain the ability to use UEL
functions.

On the plus side, UEL functions can make screen widget and mini-language code 
more flexible and more powerful. On the minus
side, you have to know the functions and what they do (in other words, no 
auto-completion when working in XML).

As an example, I frequently need to know the size of a List, Map, or String. 
With current code, I have to use the bsh: prefix
and a short script:

<set field="mapSize" value="${bsh:uiLabelMap.size();}" type="Integer"/>.

Using a UEL function:

<set field="mapSize" value="${util:size(uiLabelMap)}" type="Integer"/>

or to get the length of a String:

<set field="stringSize" value="${util:size(uiLabelMap.CommonParty)}" 
type="Integer"/>.

I don't know if this would be of any use, or if it is desirable. I'm just 
tossing the idea out there for discussion.

-Adrian





Reply via email to