Following this example, in SAP UI5 (I'm using 1.108 atm), the call to this.getOwnerComponent().getModel("i18n").getResourceBundle()
returns a fulfilled promise instead of the resource bundle object.
Since what version or via what setting is this behaviour changed?
To cope with this, I'm using await in my formatter function:
sap.ui.define([], function () {
'use strict'
return {
formatText: async function () {
var oRB = await this.getOwnerComponent()
.getModel('i18n')
.getResourceBundle()
return oRB.getText('hi')
}
}
})