Skip to Content
0

Formatter on dynamic creation of sap.m.ObjectAttribute

Feb 05 at 04:20 PM

27

avatar image
Former Member

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.

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

0 Answers