on 07-16-2020 2:37 PM
Hi ,
I want to show error message that return from odata . I use smart table and filter . so I can't catch the error message from odata .
How can I get error message and show in screen ?
I write the logic in search event of smart filter bar and beforeRebindTable event of smart Table but there is no return data . After the event the error shown as image . How should I do?
Best Regards,
Phyo
model has a method attachRequestFailed
check if it can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PhyoPa,
I recommend to use message model and Error handler to show up the messages.
https://sapui5.hana.ondemand.com/#/topic/81c735e69d354de98b0bd139e4bd4e10
Error handler is something you have to write on your own, to catch the exception.
You need to use. as Jun Wu suggested, attachRequestFailed event to catch the error for model.
oModel.attachRequestFailed(this._showErrorMessage);
Inside the _showErrorMessage, you can then decide whether to show it as dialog or leave it.
Thanks
Prashil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.