-
1. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
feuyeux May 9, 2012 12:37 AM (in response to war0071)By now, there is no deocument discusses the queue mechanism of richfaces, it maybe a weak design in asynchronize. Perhaps, we can use the global queue component to debug this issue and find the point occurs the crach during the request period.
Addition to the code, I think the below code should be improved to check the element. If necessary, please indicate where the code from.
if(typeof source==="string"){
element=document.getElementById(source)
}else{
if(typeof source==="object"){
element=source
}else{
throw new Error("jsf.request: source must be object or string")
}
}
if(!element.name){
element.name=element.id
}
Others ,do you know this kind of queue issue and if it's really a bug, does richfaces4.2.x have fixed this issue?
-
2. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 9, 2012 1:44 AM (in response to feuyeux)the code come from jsf.js
-
3. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 9, 2012 2:27 AM (in response to war0071)Sorry, this is come from JSF, I will goto JSF website find answer
-
4. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 9, 2012 3:33 AM (in response to war0071)we can also think this is richfaces bug, before richfaces invole jsf.ajaxContainer.jsfRequest() method, richface must check the source is existed.
-
5. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 9, 2012 6:32 AM (in response to war0071)I just changed packed.js by myself, like below, I don't know is richfaces now fixed it?
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 && 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)
}};
-
6. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 15, 2012 10:35 PM (in response to war0071)change line :
+ if(T.source && document.getElementById(T.source)) to :
if(T.source && (typeof T.source==="object" || (typeof T.source === "string" && document.getElementById(T.source) ))){
-
7. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
lfryc May 16, 2012 8:47 AM (in response to war0071)Hey Zhifu Jin,
could you please create issue in tracker and attach the patch?
https://issues.jboss.org/browse/RF
Thanks,
~ Lukas
-
8. Re: richfaces4.1.0.Final javascript error browser crash, Is this a bug?
war0071 May 17, 2012 3:28 AM (in response to lfryc)I had create it, see https://issues.jboss.org/browse/RF-12268