0x80040111 (NS_ERROR_NOT_AVAILABLE) in Firefox when adding AjaxEventBehavior to 
DownloadLink
--------------------------------------------------------------------------------------------

                 Key: WICKET-1481
                 URL: https://issues.apache.org/jira/browse/WICKET-1481
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-final
         Environment: Tomcat 6.0.14
Firefox 2.0.0.13
Windows 2k
            Reporter: John McKay
            Priority: Minor


When I click the link in the following code I get 

INFO: Initiating Ajax GET request on 
../?wicket:interface=:2:Download::IBehaviorListener:0:1&random=0.6715484338298661
INFO: Invoking pre-call handler(s)...
ERROR: Exception evaluating AJAX status: [Exception... "Component returned 
failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]"  
nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: 
http://localhost:8080/SSS/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
 :: anonymous :: line 896"  data: no]
ERROR: Received Ajax response with code: unavailable

in my ajax debug window. The code works fine in IE 6 SP 1. adding 
target="_blank" to the anchor tag seems to cause this problem to go away. 

TestDLBug.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>
<html>
<body>
<a wicket:id="Download" >Link</a>
<span wicket:id="Component">Red</span>

</body>
</html>

TestDLBug.java 
public class TestDLBug extends WebPage {
        private static final long serialVersionUID = 1L;
        private Label updateLabel;
        private AbstractLink link;
        public String modelString;
        
        public TestDLBug () {
                modelString = "red";
                add( updateLabel = new Label( "Component", new PropertyModel( 
this, "modelString" ) ) );
                updateLabel.setOutputMarkupId( true );
                add( link = new DownloadLink( "Download", new File( 
"c:\test.txt" ) ) );                
                link.add( new AjaxEventBehavior( "onclick" ) {
                        protected void onEvent(AjaxRequestTarget target) {
                                modelString = "green";
                                target.addComponent( updateLabel );
                        }       
                });
        }
}




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

Reply via email to