Re: Discussion: Unified Expression Language Functions

2008-12-20 Thread Jacques Le Roux
Thanks Adrian, I tried to send you a msg directly but got This is an automatically generated Delivery Status Notification. Delivery to the following recipients is still underway after 20.3 hour(s): * adri...@hlmksw.com Will keep trying and contact you if the message can't be delivered

Re: Discussion: Unified Expression Language Functions

2008-12-20 Thread Jacques Le Roux
, Jacques Le Roux jacques.le.r...@les7arts.com wrote: From: Jacques Le Roux jacques.le.r...@les7arts.com Subject: Re: Discussion: Unified Expression Language Functions To: dev@ofbiz.apache.org Date: Friday, December 19, 2008, 9:27 AM From: Adrian Crum adri...@hlmksw.com Adam Heath wrote: David E

Re: Discussion: Unified Expression Language Functions

2008-12-20 Thread Adrian Crum
That's my work address and it has all non-USA IP addresses blocked. You can use this one for personal emails. -Adrian --- On Fri, 12/19/08, Jacques Le Roux jacques.le.r...@les7arts.com wrote: From: Jacques Le Roux jacques.le.r...@les7arts.com Subject: Re: Discussion: Unified Expression

Re: Discussion: Unified Expression Language Functions

2008-12-19 Thread Adam Heath
David E Jones wrote: This may be a novel idea... but you could always test them and see if they work or not... ;) How about we keep the current custom parser, but then add uel as a prefix, like ${bsh:} is, then issue warnings for strings that don't match a prefix, giving the line number/file

Re: Discussion: Unified Expression Language Functions

2008-12-19 Thread Adrian Crum
Adam Heath wrote: David E Jones wrote: This may be a novel idea... but you could always test them and see if they work or not... ;) How about we keep the current custom parser, but then add uel as a prefix, like ${bsh:} is, then issue warnings for strings that don't match a prefix, giving the

Re: Discussion: Unified Expression Language Functions

2008-12-19 Thread Jacques Le Roux
From: Adrian Crum adri...@hlmksw.com Adam Heath wrote: David E Jones wrote: This may be a novel idea... but you could always test them and see if they work or not... ;) How about we keep the current custom parser, but then add uel as a prefix, like ${bsh:} is, then issue warnings for strings

Re: Discussion: Unified Expression Language Functions

2008-12-19 Thread Adrian Crum
...@les7arts.com Subject: Re: Discussion: Unified Expression Language Functions To: dev@ofbiz.apache.org Date: Friday, December 19, 2008, 9:27 AM From: Adrian Crum adri...@hlmksw.com Adam Heath wrote: David E Jones wrote: This may be a novel idea... but you could always test them and see

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
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 adri...@hlmksw.com Now that we have the Unified

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
From: Jacques Le Roux jacques.le.r...@les7arts.com 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

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
Also could {util: syntax deal with stuff like {bsh:org.ofbiz.* (ie replace bsh by util there) ? This would allow to replace most of bsh uses in xml files Thanks Jacques From: Jacques Le Roux jacques.le.r...@les7arts.com Hi Adrian, Is {util: syntax also dealing with ternary operator (did

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
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 jacques.le.r...@les7arts.com From: Jacques Le Roux jacques.le.r...@les7arts.com Also could {util: syntax deal with stuff

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Adrian Crum
I was considering something like bsh:run(...) but I'm still busy with getting some of the bugs worked out of the UEL integration. -Adrian Jacques Le Roux wrote: OK, I'm reading http://java.sun.com/products/jsp/reference/techart/unifiedEL.html It will be more clear, thank askikng stupid

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Adrian Crum
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}

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
So the sequel should be ok, please confirm (I will try to post the patch as attachment in another email - for readability - but I'm afraid it will not get through) Index: applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Adrian Crum
I don't think that will work - UEL doesn't allow direct method calls like that. The JUEL library has an extension that supports it, but I have that disabled. -Adrian Jacques Le Roux wrote: So the sequel should be ok, please confirm (I will try to post the patch as attachment in another email

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
From: Adrian Crum adri...@hlmksw.com I don't think that will work - UEL doesn't allow direct method calls like that. The JUEL library has an extension that supports it, but I have that disabled. OK, we will see then, I revert locally for now. Jacques -Adrian Jacques Le Roux wrote: So the

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
Thanks for clarification Adrian, I must admit the information in http://java.sun.com/products/jsp/reference/techart/unifiedEL.html are not quite clear :/ I think I got most it though, is there a better reference ? I did a bunch of change. I guess now that most of them were correct, but as I

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread David E Jones
This may be a novel idea... but you could always test them and see if they work or not... ;) -David On Dec 18, 2008, at 2:09 PM, Jacques Le Roux wrote: Thanks for clarification Adrian, I must admit the information in http://java.sun.com/products/jsp/reference/techart/unifiedEL.html

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Jacques Le Roux
Patch attached for review Jacques From: Adrian Crum adri...@hlmksw.com Jacques, UEL supports ternary operations. So, set field=parameters.debitTotal value=${bsh:(showDebit? (debitTotal + absolutePostedBalance): (debitTotal))} type=BigDecimal/ becomes set field=parameters.debitTotal

Re: Discussion: Unified Expression Language Functions

2008-12-18 Thread Adrian Crum
http://jcp.org/aboutJava/communityprocess/final/jsr245/ Click on one of the Download links, accept the terms, then download the file marked: JavaServer Pages 2.1 Expression Language Specification (pdf) -Adrian Jacques Le Roux wrote: Thanks for clarification Adrian, I must admit the

Discussion: Unified Expression Language Functions

2008-12-08 Thread Adrian Crum
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