Skip to Content

How to find all the format options for data types?

Hello community.

I started learning SAPUI5 following the steps from the basic openSAP course, and i have some doubts regarding the use of data types for formatting.

In the code below, inserted in my view.xml, i'll show you what the course directed me to do. This code is part of a <List> feature from sap.m.List API:

<ObjectListItem	title="{Name}"
				number="{
					parts: [
						{path: 'Price'},
						{path: 'CurrencyCode'}
					],
					type: 'sap.ui.model.type.Currency',
					formatOptions: {
						showMeasure: false
					}
				}"
				numberState="{= ${Price} > 500 ? 'Error' : 'Success'}"
				numberUnit="{CurrencyCode}"
				intro="{ProductID}">
</ObjectListItem>

In the example above i used the "showMeasure" at the format options. I was looking for all the format options at "https://sapui5.hana.ondemand.com/" but i didn't find anything.

Digging a little deeper in the web i found some things at "https://sapui5.hana.ondemand.com/1.54.8/index.html#/api/sap.ui.core.format.NumberFormat/overview", that is, i found what i was looking for in an older (obsolete) version.

Unfortunately it shows a message that this must not be used (Constructor for NumberFormat - must not be used: To get a NumberFormat instance, please use getInstance, getFloatInstance or getIntegerInstance.).

The question is:

- How can i search these and more values for classes parameters using the newest version of SAPUI5 demo kit? Is there any other way to search these information?

Thank you in advance.

Vitor

a.jpg (107.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer