You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by rohit2006 <ro...@yahoo.com> on 2009/06/10 12:06:35 UTC
Need help with groovy and ftl
Hi,
I am doing a query in orderview.groovy as follows, where i am getting a
retreiving a order from a table amazonfps:
amazonOrder = delegator.findByAnd("Amazonfps", [orderId : orderId]);
context.amazonOrders = amazonOrder.orderId;
Now, when i use the context amazonOrders, in the orderview.ftl, the orderID
retreived in enclosed in square brackets eg. [CO10652], which i am unable to
get rid off. I cannot use the data in this format and have to remove the
square brackets.
I am not sure what and where the issue is. Any help will be appreciated.
Thanks
Rohit
--
View this message in context: http://www.nabble.com/Need-help-with-groovy-and-ftl-tp23959205p23959205.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Need help with groovy and ftl
Posted by rohit2006 <ro...@yahoo.com>.
Hi Arun,
Thanks so much, I knew the value returned was a Generic Value, but did not
know that it had to be iterated. Now it works fine after putting it in a
list.
Thanks a lot for the help.
Rohit
Arun Patidar wrote:
>
> Hello Rohit,
>
> findByAnd return list of Generic Values. So you must iterate the list,
> even though it have only one record. After that you fetch the orderId
>
> Thanks
> --
> AP
>
>
> rohit2006 wrote:
>> Hi,
>>
>> I am doing a query in orderview.groovy as follows, where i am getting a
>> retreiving a order from a table amazonfps:
>>
>> amazonOrder = delegator.findByAnd("Amazonfps", [orderId : orderId]);
>> context.amazonOrders = amazonOrder.orderId;
>>
>> Now, when i use the context amazonOrders, in the orderview.ftl, the
>> orderID
>> retreived in enclosed in square brackets eg. [CO10652], which i am unable
>> to
>> get rid off. I cannot use the data in this format and have to remove the
>> square brackets.
>>
>> I am not sure what and where the issue is. Any help will be appreciated.
>>
>> Thanks
>>
>> Rohit
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Need-help-with-groovy-and-ftl-tp23959205p23960058.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Need help with groovy and ftl
Posted by Arun Patidar <ar...@hotwaxmedia.com>.
Hello Rohit,
findByAnd return list of Generic Values. So you must iterate the list,
even though it have only one record. After that you fetch the orderId
Thanks
--
AP
rohit2006 wrote:
> Hi,
>
> I am doing a query in orderview.groovy as follows, where i am getting a
> retreiving a order from a table amazonfps:
>
> amazonOrder = delegator.findByAnd("Amazonfps", [orderId : orderId]);
> context.amazonOrders = amazonOrder.orderId;
>
> Now, when i use the context amazonOrders, in the orderview.ftl, the orderID
> retreived in enclosed in square brackets eg. [CO10652], which i am unable to
> get rid off. I cannot use the data in this format and have to remove the
> square brackets.
>
> I am not sure what and where the issue is. Any help will be appreciated.
>
> Thanks
>
> Rohit
>
>