[richfaces-issues] [JBoss JIRA] (RF-12268) 4.1.0.final javascript error : element is null, ajax queue operation

Brian Leathem (JIRA) jira-events at lists.jboss.org
Thu Aug 2 16:51:07 EDT 2012


     [ https://issues.jboss.org/browse/RF-12268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Leathem updated RF-12268:
-------------------------------

        Steps to Reproduce: 
# click button send first ajax request to server, don't response it.
# click the button in your render area, the button will disappear when the response arrived.
# the first response arrived.

  was:
1. click button send first ajax request to server, don't response it.
2. click the button in your render area, the button will disappear when the response arrived.
3. the first response arrived.

    Workaround Description: 
I just changed packed.js by myself, like below:

{code}
if(R[0].getReadyToSubmit() ){
    Z=T=R.shift();
    N.debug("richfaces.queue: will submit request NOW");
    var a=T.options;
    a["AJAX:EVENTS_COUNT"]=T.eventsCount;
//modify by zhifu for "element is null" bug on 09 May, 2012
+    if(T.source && (typeof T.source==="object" ||  (typeof  T.source === "string" && document.getElementById(T.source) ))){
        E.ajaxContainer.jsfRequest(T.source,T.event,a);
+    }else{
+        T = null;
+        return;
+   }  
//modify end
    if(a.queueonsubmit){
        a.queueonsubmit.call(Z)
    }
    J("onrequestdequeue",Z)
}};
{code}

  was:
I just changed packed.js by myself, like below:

if(R[0].getReadyToSubmit() ){
    Z=T=R.shift();
    N.debug("richfaces.queue: will submit request NOW");
    var a=T.options;
    a["AJAX:EVENTS_COUNT"]=T.eventsCount;
//modify by zhifu for "element is null" bug on 09 May, 2012
+    if(T.source && (typeof T.source==="object" ||  (typeof  T.source === "string" && document.getElementById(T.source) ))){
        E.ajaxContainer.jsfRequest(T.source,T.event,a);
+    }else{
+        T = null;
+        return;
+   }  
//modify end
    if(a.queueonsubmit){
        a.queueonsubmit.call(Z)
    }
    J("onrequestdequeue",Z)
}};

           Forum Reference: https://community.jboss.org/message/735917  (was: https://community.jboss.org/message/735917)

    
> 4.1.0.final javascript error : element is null, ajax queue operation
> --------------------------------------------------------------------
>
>                 Key: RF-12268
>                 URL: https://issues.jboss.org/browse/RF-12268
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component
>    Affects Versions: 4.1.0.Final
>            Reporter: zhifu Jin
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> the issue is when have two requests like below will cause js error:"element is null" and browser crash.   
>                1. first request sending, and don't have response arrived.
>                2. the second request start, will add this request into queue.
>                3. first response arrived , the second request will be dequeue and send request, it will find source element first,  and our page had changed, the element is null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list