[
https://issues.apache.org/jira/browse/WICKET-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887123#action_12887123
]
Martin Makundi commented on WICKET-1911:
----------------------------------------
It's an easy workaround:
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
setResponsePage(DownloadWebPage.class);
}
public static class DownloadWebPage extends WebPage {
public DownloadWebPage() {
final IResourceStream resourceStream = new AttachmentResourceStream(
new ByteArrayInputStream(bytes));
getRequestCycle().setRequestTarget(
new ResourceStreamRequestTarget(resourceStream) {
@Override
public String getFileName() {
return "Presentation.ppt";
}
});
}
}
> setRequestTarget(ResourceStreamRequestTarget) doesn't work with AJAX
> --------------------------------------------------------------------
>
> Key: WICKET-1911
> URL: https://issues.apache.org/jira/browse/WICKET-1911
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-M3
> Environment: Win32 / Tomcat or Jetty
> Reporter: Adriano dos Santos Fernandes
> Assignee: Igor Vaynberg
> Attachments: ajax-resource-redirect.zip
>
>
> In test case attached, you see:
> RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(
> new MyWebResource().getResourceStream()));
> doesn't work when clicking the AJAX link. The content is displayed inside the
> AJAX Debug Window instead of redirect the page.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.