You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2008/09/16 20:10:44 UTC

[jira] Assigned: (WICKET-1838) AjaxLink setResponsePage to a stream = queue is not resumed after redirect.

     [ https://issues.apache.org/jira/browse/WICKET-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp reassigned WICKET-1838:
-----------------------------------

    Assignee: Matej Knopp

> AjaxLink setResponsePage to a stream = queue is not resumed after redirect.
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-1838
>                 URL: https://issues.apache.org/jira/browse/WICKET-1838
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: wicket 1.3.4
> tomcat 5.5.16
>            Reporter: Louis Letourneau
>            Assignee: Matej Knopp
>
> When I click on an AjaxLink that does a setResponsePage towards a ResourceStreamRequestTarget, afetr the download, the links on the page become non-clickable. In the Ajax debug window I get a 'Channel busy - postponing'.
> Details:
> I have a page with many AjaxLinks. The links check whether some data is available. If the data is available it does a setResponsePage towards a BookmarkablePage that can work with the data.
> The Page that handles the data is mounted on a 'custom' QueryStringUrlCodingStrategy. In 'decode()' the strategy checks if manipulations are needed. If not the strategy answers with a ResourceStreamRequestTarget.
> So here's the path that causes the error:
> onClick->setResponsePage->decode->ResourceStreamRequestTarget
> Once a link has been clicked no other links are clickable on the page.
> The redirect seems to happen, but only once.
> Say there are 3 files to download on the page, I would need to:
> click link1 -> download the file -> refresh the page -> click link2 -. etc.
> I shouldn't need to refresh the page.
> If I don't refresh the page, when I click link2 I'll get 'Channel busy - postponing'. 
> AjaxLink Code:
> -------------------------------------------->
> public void onClick(AjaxRequestTarget target)
>             {
>                 if(file.isOnline()) {
>                     PageParameters params = new PageParameters();
>                     params.add("id", String.valueOf(typeId));
>                     params.add("type", type.toString());
>                     setResponsePage(StageableFilePage.class, params);
>                 }
>                 else {
>                     modal.show(target);
>                 }
>             }
> -------------------------------------------->
> QueryStringUrlCodingStrategy Code:
> -------------------------------------------->
>     public IRequestTarget decode(RequestParameters requestParameters) {
>     [..get id and fileType and make sure the user has priviledges..]
>         final StageableFile file = resolveFile(id, fileType);
>         if(file.isOnline()) {
>             IResourceStream resourceStream = new FileResourceStream(file);
>             //Content-type will be set by the ResourceStreamRequestTarget
>             ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(resourceStream) {
>                 @Override
>                 public String getFileName() {
>                     return file.getName();
>                 }
>             };
>             return rsrt;
>         }
>         else {
>             return super.decode(requestParameters);
>         }
>     }
> -------------------------------------------->

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.