on 09-04-2017 3:57 PM
Hello Experts,
I'm unable to figure out on how to display error message if there is a failure in oData Binding.
I know that we have methods ( error() and success() ) that we could use if we call the oData from the controller succeeds or fails. But how to display the error message to the user if the oData call from the XML view fails?
I'm using the following code in my XML View:
<Select items="{path: '/profileDetSet'}">
<core:Item key="{Profile}" text="{Description}"/>
</Select>
I've more than one Select and a table too in my View. How can we catch the error if the Binding fails for some reason from the backend?
Thanks & Regards,
Soundarya
Hi Soundarya,
did you get a solution for your issue?
Thanks
Nahed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can try attaching below two events of your model where you are defining the model in your app,
attachRequestFailed or attachMetadataFailed as below,
oModel.attachRequestFailed(function(oEvent) {
// using oEvent.getParameters() you can get error details
}, this);
oModel.attachMetadataFailed(function(oEvent) {
// using oEvent.getParameters() you can get error details
}, this);
this will trigger if any request or metadata fails respectively.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.