cancel
Showing results for 
Search instead for 
Did you mean: 

how to write binary data to browser -> File Save dialog

Former Member
0 Kudos

Hi,

problem:

i have a working webservice and i get binary data from that webservice.

my dynpro java already works and i have byte[] b which has my binary result.

what i want:

when the user clicks on the button, the action onActionGetResult() is executed and inside this method, the byteArray b exists. what can i do, to say the dynpro application that it should send the binary data direct to the browser, so that the "File Save Dialog" appears and the user can save the file to the harddisk

any ideas?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I've found the solution:

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(
res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()), 
res.getResourceName()); 
window.show();

this worked for me