Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
I have modified my quickstart https://github.com/solomax/ajax-download disposition set to ATTACHMENT problems so far: 1) only one AjaxDownload on the page works (example: https://github.com/solomax/ajax-download/commit/ed5c8f898318da9933369c4bc5ecb5f12fb046c1 ) 2) setting file name has no effect:

[GitHub] wicket pull request #212: WICKET-6177 Blocking page serialization

2017-04-12 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/wicket/pull/212 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enab

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sven Meier
Hi Martin, actually I meant that FileSystemResource could have a way to *configure* the content disposition. There seems to be some duplication emerging between FileSystemResource and ResourceStreamResource now. Regards Sven On 12.04.2017 22:33, Martin Grigorov wrote: Hi Sven, This is

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Martin Grigorov
On Wed, Apr 12, 2017 at 10:33 PM, Martin Grigorov wrote: > Hi Sven, > > > This is another thing that could be added to FileSystemResource besides > the file name. > > Why do you think it is safe to assume that ATTACHMENT should be set ? > I see that > org.apache.wicket.request.resource.BaseDataR

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Martin Grigorov
Hi Sven, > This is another thing that could be added to FileSystemResource besides the file name. Why do you think it is safe to assume that ATTACHMENT should be set ? I see that org.apache.wicket.request.resource.BaseDataResource#newResourceResponse() does this. But org.apache.wicket.request.re

[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/wicket/pull/219 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enab

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sven Meier
Hi Maxim, the resource is responsible to set the right content disposition. This is another thing that could be added to FileSystemResource besides the file name. Have fun Sven On 12.04.2017 14:39, Maxim Solodovnik wrote: I thought Attachment is set by default since it is download Sho

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
I thought Attachment is set by default since it is download Should I retest with it? Can invalid file name be caused by wrong disposition type? On Wed, Apr 12, 2017 at 6:46 PM, Sven Meier wrote: > Hi, > > you have to set the content disposition too: > > response.setContentDisposition(Conte

[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread solomax
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/219#discussion_r30572 --- Diff: wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java --- @@ -95,7 +95,9 @@ protected ResourceResponse createResourceRespons

[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request: https://github.com/apache/wicket/pull/219#discussion_r30176 --- Diff: wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java --- @@ -95,7 +95,9 @@ protected ResourceResponse createResourceRespo

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sven Meier
Hi, you have to set the content disposition too: response.setContentDisposition(ContentDisposition.ATTACHMENT); We could improve the JavaScript so it is more lenient and works without "attachment" in the header. Have fun Sven On 12.04.2017 12:32, Maxim Solodovnik wrote: In case I'm settin

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
I'm not sure issue is caused by FileSystemResource I believe it is caused by AjaxDownload Here is example with 2 AjaxDownloads on the page https://github.com/solomax/ajax-download it doesn't work this way File name also is not being set On Wed, Apr 12, 2017 at 5:53 PM, Martin Grigorov wrote: >

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Martin Grigorov
Maxim, Please create a quickstart and attach it to the ticket for FileSystemResource! We have to improve this! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Apr 12, 2017 at 12:32 PM, Maxim Solodovnik wrote: > In case I'm setting Location as iFrame, file

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
In case I'm setting Location as iFrame, file being downloaded is "download.zip" The file name set is also has no effect On Wed, Apr 12, 2017 at 5:12 PM, Maxim Solodovnik wrote: > Weird enough > I have changed the code to produce pain text file (And it is being created > and has valid text) > But

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
Weird enough I have changed the code to produce pain text file (And it is being created and has valid text) But after "mvn clean jetty:run" same zip file is being downloaded like it was cached somewhere in the browser On Wed, Apr 12, 2017 at 4:51 PM, Sebastien wrote: > Then, set the content type

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sebastien
Then, set the content type to text/html so see if the filename is correct in that case. On Wed, Apr 12, 2017 at 11:44 AM, Maxim Solodovnik wrote: > In case I'm setting file name to "backp.zip.html" the file is being > downloaded as .zip > I guess "zip" is being set from content type > File name

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
In case I'm setting file name to "backp.zip.html" the file is being downloaded as .zip I guess "zip" is being set from content type File name is just ignored On Wed, Apr 12, 2017 at 4:38 PM, Sebastien wrote: > I know, it's just to test the filename... > > On Wed, Apr 12, 2017 at 11:29 AM, Maxim

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sebastien
I know, it's just to test the filename... On Wed, Apr 12, 2017 at 11:29 AM, Maxim Solodovnik wrote: > But I need zip extension, otherwise it will be unusable > > On Wed, Apr 12, 2017 at 4:27 PM, Sebastien wrote: > > > I did the same problem recently (I still have to answer Sven about this,

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
But I need zip extension, otherwise it will be unusable On Wed, Apr 12, 2017 at 4:27 PM, Sebastien wrote: > I did the same problem recently (I still have to answer Sven about this, I > will do it soon) > Try out changing your extension to ".html" to see if it's the same > behavior, maybe it

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Sebastien
I did the same problem recently (I still have to answer Sven about this, I will do it soon) Try out changing your extension to ".html" to see if it's the same behavior, maybe it will help you to investigate further. (in my case, "csv" had issue with the filename and "html" was fine)

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
It called only once, Correct file name is being set But file is being downloaded with UUID as name On Wed, Apr 12, 2017 at 4:10 PM, Martin Grigorov wrote: > Hi Maxim, > > Put a breakpoint at ResourceResponse.setFileName(String) and see how many > times it is called and with what values. > > Mart

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Martin Grigorov
Hi Maxim, Put a breakpoint at ResourceResponse.setFileName(String) and see how many times it is called and with what values. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Apr 12, 2017 at 11:07 AM, Maxim Solodovnik wrote: > Hello All, > > I have updated m

Re: Question regarding new AjaxDownload (WICKET-6286)

2017-04-12 Thread Maxim Solodovnik
Hello All, I have updated my project https://github.com/solomax/ajax-download/commit/453663a55f390e54354381ab0f009d194e37e87c To set filename But file being downloaded has random UUID as file name, what am I doing wrong? On Wed, Mar 29, 2017 at 9:31 PM, Maxim Solodovnik wrote: > Will try to mig

[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread martin-g
Github user martin-g commented on a diff in the pull request: https://github.com/apache/wicket/pull/219#discussion_r111096456 --- Diff: wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java --- @@ -68,17 +68,19 @@ public FileSystemResource() @Override

[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread solomax
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/219 [WICKET-6355] It is now possible to set fileName to FileSystemResource You can merge this pull request into a Git repository by running: $ git pull https://github.com/solomax/wicket master Al