In SAPUI5\'s JSView, it is quite easy to pass the current control reference to a formatter function:
oTable.bindItems(
Define your formatter functions in a separate file. Then this will be the Control whose property is being formatted.
my/own/Formatter.js:
sap.ui.define(function () {
"use strict";
return {
formatCell: function (iValue) {
var idText = this.getId(); //this references the current control
return iValue;
}
};
});
View: