0
1

Hello! How can I download a file from the Ivy-Server's "files/application"-folder to a folder on the client with JSF per program-code? We are using only JSF in this project. No RIA. Is it possibly to download a file to the client without user-interaction in JSF, at all? Kind Regards, Helmut

asked 13.09.2015 at 00:42

Helmut%20Burgemeister's gravatar image

Helmut Burge...
36457
accept rate: 100%

edited 14.09.2015 at 11:13

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
8.2k11650

Hi Helmut, Is it possibly to download a file to the client without user-interaction in JSF, at all? I think it is not possible because simply browsers don't allow it due to security issues (web page just can't put files into a specific folder of the client without their approvement).

(15.09.2015 at 19:49) Genzer Hawker Genzer%20Hawker's gravatar image

In my project I solved it via the RequestContext framework from primefaces. It lets you invoke java script code on the client. And in this case I send a redirect to my file as javascript command. The following code should work in a dialog script activity:

import org.primefaces.context.RequestContext;
String redirectScript = "window.location.href='"+ivy.html.fileref(in.exportedFile)+"';";
RequestContext.getCurrentInstance().execute(redirectScript);

sample project context

link

answered 14.09.2015 at 10:28

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
8.2k11650
accept rate: 68%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×76
×16

Asked: 13.09.2015 at 00:42

Seen: 1,505 times

Last updated: 15.09.2015 at 19:50