Quantcast
Channel: SCN : All Content - SAP Fiori
Viewing all articles
Browse latest Browse all 1807

Weird issue in custom Fiori app for displaying file attachments

$
0
0

Hello experts,

 

We have developed a custom Fiori app for showing invoice details in master detail template. The master page shows the list of invoices pending for approval and the detail page shows the header and item details of selected invoice in a tab(Information). Also there is a tab for displaying attachments in the detail page.

 

Now in the attachments tab I am first displaying the list of attachments present for the selected invoice using sap.m.Table. In this table's selectionChange event I am triggering a call to the oData service for displaying the attachment - the format of the URL is /sap/opu/odata/sap/<ODataService>/FileSet(<input params>)/$value and setting the response URI to an iFrame within an HTML control. When I select the attachment from the table it triggers this URL and shows a popup to save the file attachment.

 

But after this if I select another invoice from the master page or click on the Info tab (which is the first tab in the IconTabBar I have used), this URL (/sap/opu/odata/sap/<ODataService>/FileSet(<input params>)/$value) gets called again (I can see it in the Network tab) and again it prompts to save the file. I have tried setting a breakpoint from the Chrome console in the selectionChange event function in the controller where I am creating the oData model and passing this URL to the model's read method - this breakpoint is reached only when I select the line from the attachment table (i.e. on table selectionChange event), yet the URL gets called on actions other than the table's selectionChange event as well.

 

Can anyone shed some light on why I might be encountering such weird behavior? Or am I missing on doing something obvious which might be causing this?

 

Regards,

Saurabh


Viewing all articles
Browse latest Browse all 1807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>