Closed mainakaich closed 8 months ago
Hi @mainakaich
thank you for your bug report and the good sample.
I was able to reproduce it and fix it.
The patch is published with version 0.31.3
.
Please try if that works for you
Hi @marianfoo
I have one more request associated with the same issue. When we have used event.preventDefault(), it is not possible to show the OData response in the UI (by using something like oEvent.getSource().addArrayToMessages( ) ). Is it possible to get any UI component from your framework so that all the error message from the OData response can be displayed on the UI component? Thanks, Mainak
You can attach a async function and wait for the OData response and show the error yourself. https://docs.spreadsheet-importer.com/pages/Events/#attach-async-functions-to-events
Hello @marianfoo
Actually we are able get the OData response. My request is, is it possible to pass our OData response to your framework so that the messages are displayed in your UI screen. E.g. if we don't use event.preventDefault(), then your framework sends and receives the OData response and displays the response in your UI screen. Can we able reuse the same UI screen by passing our OData response to your framework? This way we won't have to develop a UI screen by ourselves to display the response messages.
Thanks, Mainak
I fixed this and updated the docs https://docs.spreadsheet-importer.com/pages/Events/#example-2 coming with version 0.31.4
OData Version
OData V2
Draft
Yes
Scenario
Fiori Elements
Environment
BTP ABAP
UI5 Spreadsheet Component
v0_31_1
What happened?
In the spreadsheet controller custom code, I have the requirement where on click of the upload button, I don't want the automatic HTTP post calls to the OData services by the spreadsheet importer UI5 component. Instead, I want to build my own post request(deep create) myself and send it to backend. So I have developed the code like below -
My expectation is event.preventDefault(); shall prevent the automatic HTTP post calls to the backend. But still the backend call is happening which I want to stop. I am attaching the entire custom code controller file(spreadSheetController.js - changed the extension to .txt so that I can attach here spreadSheetController.js.txt ) for your reference.
Relevant log output
Spreadsheet Component Init
Manifest