Skip to Content
0

Currency formatting in ObjectListItem Using XML View in Eclipse Luna Version

Feb 27, 2017 at 08:23 AM

90

avatar image

Hi Experts,

I'm new to SAPUI5 Please help me ,Here I'd like to bind My JSON Data with XML View having ObjectListItem control an amount with a specific currency field and symbol , I use the following coding in a XML view but here I'm not getting currency field (amount)and symbol is not showing in any value in my app...please help me...

<ObjectListItem title="{products>ProductName}"

number="{ parts: [ {path:'products>UnitPrice'},

{path:'/CurrencyCode'}],

type:'sap.ui.model.type.Currency',

formatOptions:{ showMeasure: false} }"

numberUnit="{/currencyCode}">

</ObjectListItem>

Regards,

fayaz

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Veeraraghavan Narasimhan
Feb 27, 2017 at 04:49 PM
0

Hello Fayaz,

We would need more information about how data model looks to be able to comment further. One issue that crops to my mind is

<ObjectListItem title="{products>ProductName}" number="{ parts: [ {path:'products>UnitPrice'}, {path:'/CurrencyCode'}],
type:'sap.ui.model.type.Currency', formatOptions:{ showMeasure: false} }" numberUnit="{/currencyCode}">
</ObjectListItem> 

I can see currencyCode and CurrencyCode and is this a typo. UI5 is case sensitive.

Thanks and Regards,

Veera

Share
10 |10000 characters needed characters left characters exceeded