Skip to Content
avatar image
Former Member

Formatter on dynamic creation of sap.m.ObjectAttribute

Hi,

I'm creating on the controller a sap.m.ObjectAttribute:

var sObjectAttribute = new sap.m.ObjectAttribute({
	title: "Uploaded On",
	text: "{ path: 'Sydate' }"
});

I need to set a formatter to the resulting text (a date); how can I achieve it?

I tried a lot of combinations, like...

var sObjectAttribute = new sap.m.ObjectAttribute({
	title: "Uploaded On",
	text: "{ path: 'Sydate' }",
	formatter: this.formatter.dateFormat
});	

or

var sObjectAttribute = new sap.m.ObjectAttribute({
	title: "Uploaded On",
	text: {
		parts: "[{ path: 'Sydate' }]",
		formatter: this.formatter.dateFormat
	}
});<br>

But nothing seems to work...

Miguel Angel.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers