Skip to Content
0

SAPUI5 Display Time field in XML

Nov 17, 2016 at 08:04 AM

27

avatar image

Hi

I am receiving data from OData and want to display it in SAPUI5. All the fields display fine except the value in the Time field does not get displayed. I am sure it has to be a syntax error as I get this message in Chrome Diagnostics:

path : 'Counter', type : 'sap.ui.model.type.Time', formatOptions: { source: { pattern: 'timestamp' }, pattern: 'HH:mm:ss' (invalid)

This is the value pulling through: PT23H59M59S

I have tried to rewrite this statement over and over removing all the format options but I can't get past the Invalid message.

Any suggestions would really be appreciated

Here is my code:

		<items>
	         <ColumnListItem press="onItemSelected">
	          <cells>
		          <Text text="{Trainid}" />
		          <Text text="{
		                path : 'Counter', 		            
		                type : 'sap.ui.model.type.Time',
		                formatOptions: {
		                  source: { pattern: 'timestamp' },
		                  pattern: 'HH:mm:ss'
                                       }" />
	           </cells>
	          </ColumnListItem>
		</items>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers