on 2020 May 14 3:25 PM
Hi experts,
I trying to rebind Dialog. First time it is working but second time it is not working. Because bindElement is not working with same path.I have to rebind Dialog.
So what can I do to trigger the event with bindElement even if the path is the same? What can I do before bindElement code?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
If the model is v2.ODataModel, calling invalidateEntry before bindElement/bindObject might help. See https://stackoverflow.com/a/59398119/5846045.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks but It didn't work. (Detail12Dialog.js?eval:26 Uncaught TypeError: oModel.invalidateEntry is not a function )
model : twoway
onBeforeOpenDialog: function () {
var oDialog = this._getDialog();
var sQmnum = this._oParentController.getPropFromViewElemntBinding("Qmnum");
// var sPath = "/altyapiMainSet('" + sQmnum + "')";
var oModel = this._oParentController.getModel();
var sKey = oModel.createKey("altyapiMainSet", {
Qmnum: sQmnum
});
oModel.invalidateEntry(sKey);
var sPath = "/" + sKey;
oDialog.bindElement({
path: sPath,
events: {
change: function (oChangeEvent) {},
dataRequested: function () {},
dataReceived: function (oData) {}
}
});
},
bozcetin
You're probably using an old version of UI5. The API invalidateEntry is available since 1.52.1. To see which version the app is running with, press Ctrl + Shift + Left Alt + P.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.