Jacques,
UEL supports ternary operations. So,
<set field="parameters.debitTotal" value="${bsh:(showDebit? (debitTotal
+ absolutePostedBalance): (debitTotal))}" type="BigDecimal"/>
becomes
<set field="parameters.debitTotal" value="${showDebit ? (debitTotal +
absolutePostedBalance) : debitTotal}" type="BigDecimal"/>
Also, the reason for the UEL function name prefix (math: str: util:) is
the same reason we have Java package names and XML namespaces - to avoid
function name clash.
-Adrian
Jacques Le Roux wrote:
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