You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2015/04/30 15:33:34 UTC

UEL issue?

Hi,

I'm not much used to UEL, but being lazy rather than adding "groovy:" I tried this one

<set field="parameters.toName" value="${parameters.firstName + ' ' + parameters.lastName}"/>

And got this

2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO| [CustomerEvents.xml#saveSmsCustomer line 45] parameters.firstName================test
2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO| [CustomerEvents.xml#saveSmsCustomer line 46] parameters.lastName================test
2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |FlexibleMapAccessor |ERROR| UEL exception while getting value: javax.el.ELException: Cannot coerce 
'test' of class java.lang.String to class java.lang.Double (incompatible value), original = parameters.firstName + ' ' + parameters.lastName
2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO| [CustomerEvents.xml#saveSmsCustomer line 48] parameters.toName================test

When with groovy it works. I tried to add the String type to no avail, normal? What do I miss?

Thanks

Jacques

Re: UEL issue?

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks, then I still prefer "groovy:" ;)

Jacques

Le 30/04/2015 15:51, Adrian Crum a écrit :
> Try
>
> <set field="parameters.toName" value="${parameters.firstName + &quot; &quot; + parameters.lastName}"/>
>
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 4/30/2015 2:33 PM, Jacques Le Roux wrote:
>> Hi,
>>
>> I'm not much used to UEL, but being lazy rather than adding "groovy:" I
>> tried this one
>>
>> <set field="parameters.toName" value="${parameters.firstName + ' ' +
>> parameters.lastName}"/>
>>
>> And got this
>>
>> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
>> [CustomerEvents.xml#saveSmsCustomer line 45]
>> parameters.firstName================test
>> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
>> [CustomerEvents.xml#saveSmsCustomer line 46]
>> parameters.lastName================test
>> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |FlexibleMapAccessor
>> |ERROR| UEL exception while getting value: javax.el.ELException: Cannot
>> coerce 'test' of class java.lang.String to class java.lang.Double
>> (incompatible value), original = parameters.firstName + ' ' +
>> parameters.lastName
>> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
>> [CustomerEvents.xml#saveSmsCustomer line 48]
>> parameters.toName================test
>>
>> When with groovy it works. I tried to add the String type to no avail,
>> normal? What do I miss?
>>
>> Thanks
>>
>> Jacques
>

Re: UEL issue?

Posted by Adrian Crum <ad...@sandglass-software.com>.
Try

<set field="parameters.toName" value="${parameters.firstName + &quot; 
&quot; + parameters.lastName}"/>


Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/30/2015 2:33 PM, Jacques Le Roux wrote:
> Hi,
>
> I'm not much used to UEL, but being lazy rather than adding "groovy:" I
> tried this one
>
> <set field="parameters.toName" value="${parameters.firstName + ' ' +
> parameters.lastName}"/>
>
> And got this
>
> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
> [CustomerEvents.xml#saveSmsCustomer line 45]
> parameters.firstName================test
> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
> [CustomerEvents.xml#saveSmsCustomer line 46]
> parameters.lastName================test
> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |FlexibleMapAccessor
> |ERROR| UEL exception while getting value: javax.el.ELException: Cannot
> coerce 'test' of class java.lang.String to class java.lang.Double
> (incompatible value), original = parameters.firstName + ' ' +
> parameters.lastName
> 2015-04-30 15:23:37,027 |http-bio-8443-exec-4 |Log |INFO|
> [CustomerEvents.xml#saveSmsCustomer line 48]
> parameters.toName================test
>
> When with groovy it works. I tried to add the String type to no avail,
> normal? What do I miss?
>
> Thanks
>
> Jacques