The problem - yet unsolved for me :(
Symptoms are well described here http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
Behavior and the way to overcome it are well described on http://www.codeproject.com/KB/aspnet/NonUSASCII.aspx
Solutions
First of all, I was unable to solve this completely :(
Coming from StackOverflow post, the good way to do would be to form the URL ending with a filename (URL-encoded), and show no filename in Content-Disposition header. All other tricks and tips work not well under different browsers.
Wicket usual approach is to use either DownloadLink or AjaxDownload (thank you guys for such a good solution! Liked it much). First of them is using usual wicket URL coding strategy and second - pretty much the same, being a AjaxBehavior and thus IBehaviorListener. That far I could see no real way to change these URLs. The issue is that both of those don't allow for custom URLs, they are actually plugged into Wicket's infrastructure of page-component-iBehaviorListener-RequestCycle-RequestCodingStrategy chain, so we don't have direct control over it.
One solution proposed by Martin Grigorov on the wicket-users mailing list was to use
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for mounting, but that did not work out for me as I needed to use containing page's model to generate the actual data.
Fail :(
Will up if any luck.
No comments:
Post a Comment