p:fileDownload

UI Components for JSF
Post Reply
burferd
Posts: 234
Joined: 01 May 2010, 16:15

14 Jun 2010, 06:49

I really like this component, as it simplifies a part of my application over it's current implementation.

Currently, I am using something with results very similar to the example in the showcase.
Basically the default OS display mechanism comes up with the options of Open, Save, or Cancel.

I have a couple situations where I would prefer to not allow the user to Save the document to the client machine, but just give them the option to view or cancel.

Can I do that with the PrimeFaces p:fileDownload component?

I don't see anything in the documentation or showcase that indicates how I could disable the "Save" option on the OS display dialog.
I'm not sure if this can even be done, but it would definitely be an advantage for my application if I could disable that option.

Thanks.
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Jun 2010, 13:51

There is a contentDisposition attribute to manage the way it is displayed, not sure if it is possible to display only view or cancel though, I guess it is browser specific.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

14 Jun 2010, 13:59

cagatay.civici wrote:There is a contentDisposition attribute to manage the way it is displayed, not sure if it is possible to display only view or cancel though, I guess it is browser specific.
Evaluation of content-disposition is browser specific. There is a good overview http://greenbytes.de/tech/tc2231/
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

burferd
Posts: 234
Joined: 01 May 2010, 16:15

14 Jun 2010, 16:15

Thanks for the veedback.
I'll try the inline mode for ContentDisposition.
It sounds like that will just display in browser page.
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests