Author: pyaschenko
Date: 2008-04-29 12:44:07 -0400 (Tue, 29 Apr 2008)
New Revision: 8345
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
http://jira.jboss.com/jira/browse/RF-3207
http://jira.jboss.com/jira/browse/RF-3118
http://jira.jboss.com/jira/browse/RF-3201
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-04-29 16:31:38 UTC
(rev 8344)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-04-29 16:44:07 UTC
(rev 8345)
@@ -324,20 +324,20 @@
}
},
- beforeUpdatePagePart: function (id)
- {
- var oldnode = window.document.getElementById(id);
- if ( oldnode ) {
-
- }
- },
-
/**
* Update DOM element with given ID by element with same ID in parsed responseXML
*/
updatePagePart : function(id, isLast){
var newnode = this.getElementById(id);
- if( ! newnode ) { LOG.error("New node for ID "+id+" is not present in
response");return;}
+ if( ! newnode )
+ {
+ LOG.error("New node for ID "+id+" is not present in response");
+ if (isLast)
+ {
+ this.doFinish();
+ }
+ return;
+ }
var oldnode = window.document.getElementById(id);
if ( oldnode ) {
@@ -373,11 +373,15 @@
LOG.debug("Update part of page for Id: "+id + "
successful");
} else {
LOG.warn("Node for replace by response with id "+id+" not found in
document");
+ if (!A4J.AJAX._scriptEvaluated && isLast)
+ {
+ this.doFinish();
+ }
}
if (A4J.AJAX._scriptEvaluated && isLast)
{
- this.doFinish()
+ this.doFinish();
}
},
@@ -830,7 +834,7 @@
for ( var k=0 ; k < childs.length ; k++ ) {
var id = childs[k];
LOG.debug("Attempt to update part of page for Id: "+id);
- if ( id ) {req.updatePagePart(id, k==childs.length-1);};
+ req.updatePagePart(id, k==childs.length-1);
};
} else {
// if none of above - error ?