You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2010/01/24 17:56:18 UTC

[jira] Commented: (WICKET-1987) Ajax response never get completed

    [ https://issues.apache.org/jira/browse/WICKET-1987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804260#action_12804260 ] 

Martin Grigorov commented on WICKET-1987:
-----------------------------------------

@Emanuele: why do you use Ajax request to return a PDF file ? You should use a normal Link to do that. Ajax requests are used to repaint part(s) of the page.

Here is what happens in your app: clicking on the link makes Ajax request, in onClick(target) you make a redirect to /printingAjax, then wicket-ajax.js receives the response with header "Ajax-Location: printingAjax" and uses plain Javascript to make the redirect: window.location = 'printingAjax'.
Wicket never process <ajax-response> and thus never calls post-handlers.



> Ajax response never get completed
> ---------------------------------
>
>                 Key: WICKET-1987
>                 URL: https://issues.apache.org/jira/browse/WICKET-1987
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4, 1.3.5
>         Environment: Tested on Firefox 2.0.0.18, 3.0.4 and Internet Explorer 7
>            Reporter: Emanuele Gesuato
>            Assignee: Matej Knopp
>            Priority: Minor
>         Attachments: mvn-quickstart.zip
>
>
> When you click on the link provided by the sample page you could see that a pdf is displayed but in the ajax debug window the ajax response never get completed. 
> It remains in "Invoking pre-call handler(s)".
> When the link is clicked, a specific QueryStringUrlCodingStrategy is called that does the following:
> 	public IRequestTarget decode(RequestParameters requestParameters) {
> 		
> 		//ContextRelativeResource context = new ContextRelativeResource("test.pdf");
> 		PackageResource resource = PackageResource.get(this.getClass(), "test.pdf");
> 		IResourceStream resourceStream = resource.getResourceStream();
> 			
> 		ResourceStreamRequestTarget rsrt = new 	ResourceStreamRequestTarget(resourceStream);
> 		
> 		 
> 		return rsrt; 
> 	} 
> I don't know if it's really a bug, but for instance, if you register several mouse icon pointer for the different ajax call you could get that the waiting state of the mouse is preserved after the action is completed.

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