Created
December 16, 2021 11:17
-
-
Save sodogan/ec6fdc1620c7b62d3a3d20285b4d23cd to your computer and use it in GitHub Desktop.
SAPUI5 extended formatter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.define([ | |
"sap/ui/base/Object" | |
], function (BaseObject) { | |
"use strict"; | |
return BaseObject.extend("com.sodogan.Products.model.formatter.obj", { | |
/** | |
* @param {sap.ui.core.UIComponent} oComponent reference to the app's component | |
*/ | |
constructor: function (oComponent) { | |
this._oComponent = oComponent; | |
this._oResourceBundle = oComponent.getModel("i18n").getResourceBundle(); | |
this._oModel = oComponent.getModel("odataDetails"); | |
}, | |
generateBackendData: function () { | |
// you can access this._oModel here and do stuff | |
return { | |
name: 'solen', | |
age: 39 | |
}; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment