Hi all,

I'm currently migrating our project to wicket 8. The migration guide was a
big help, thank you for that :)

I could solve all but one problem regarding an internal file download.
We have an ajax-button that returns a
"/window.location.href='dynamic-url/'".
Somehow I'm always getting the page source as a response, instead of the
actual file.

Technically I have a page implementing the /IRequestListener/ interface for
the /onRequest()/-method.
That page holds an ajaxlink that returns the above mentioned js-snippet with
the url generated by "/urlForListener(new PageParameters())/" method on the
page.
In /onRequest()/ we create a /ResourceStreamRecource /that should be
delivered to the user. 
Something like this:            
                /final Attributes a = new Attributes(cycle.getRequest(),
cycle.getResponse(), null);
                resource.setFileName(new Date().getTime() +".txt");
                resource.respond(a);
/
I can see that /onRequest /gets called, but what's delivered in the frontend
is always the page markup.
Also if I click the link again I'm getting a /StalePageException/.

Any idea what might cause this behavior?

I also upload a quickstart that shows the problem.
myproject.7z
<http://apache-wicket.1842946.n4.nabble.com/file/t375522/myproject.7z>  

Thanks for your help,

Ravi

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to