on 05-16-2021 8:51 AM
Hello Team,
I have a requirement to oData service inside onExit hook method. I have written below code but unfortunately oData service is not getting called as view is destroyed immediately . Is there any way to add wait or delay the destroy of view until oData read request is complete ?
window.addEventListener('beforeunload', (event) => {this._mainService.read("/GreVersLockSet(Gremienversionid=guid" + "'" + this._PreviousGreVersion + "'" + ",LockFlg=" + false + ")",
null, null, false,
{
success: function (data) {
that._PreviousGreVersion = "";
}
});
}
The sap.ui.core.mvc.View class has an event called beforeExit. You can try to put the OData request into it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.