Author: alexsmirnov
Date: 2007-05-07 18:57:59 -0400 (Mon, 07 May 2007)
New Revision: 183
Modified:
trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
Fix AJSF-59 , double call 'onsubmit' in a a4j:form
Modified: trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-05-07 21:04:16 UTC (rev
182)
+++ trunk/framework/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-05-07 22:57:59 UTC (rev
183)
@@ -484,6 +484,7 @@
LOG.debug("Form submitted by button "+A4J._formInput.id);
opt.control = A4J._formInput;
A4J._formInput = null;
+ opt.submitByForm=true;
}
A4J.AJAX.Submit(containerId,form,null,opt);
}
@@ -570,7 +571,7 @@
};
};
// TODO - test for null of form object
- if(form && form.onsubmit) {
+ if(!options.submitByForm && form && form.onsubmit) {
LOG.debug("Form have onsubmit function, call it" );
if( form.onsubmit() == false ){
return false;