cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Display Time field in XML

former_member272160
Discoverer
0 Kudos

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>

Accepted Solutions (0)

Answers (0)