Author: sergeyhalipov
Date: 2007-10-10 10:20:50 -0400 (Wed, 10 Oct 2007)
New Revision: 3312
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
http://jira.jboss.com/jira/browse/RF-1089
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-10 14:03:34 UTC
(rev 3311)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-10 14:20:50 UTC
(rev 3312)
@@ -899,11 +899,13 @@
var data = request.getJSON('_ajax:data');
try {
var newscript = Sarissa.getText(oncomplete,true);
-// if (window.execScript) {
-// window.execScript( newscript );
-// } else {
- window.eval(newscript);
-// }
+ if (request.domEvt.target) {
+ request.domEvt.target.oncomplete = new Function(newscript);
+ request.domEvt.target.oncomplete();
+ } else {
+ window.eval(newscript);
+ }
+
} catch(e){
LOG.error('Error evaluate oncomplete function '+e.Message);
}