if(typeof action == 'string'){
action = new Roo.form.Action.ACTION_TYPES[action](this, options);
}
- Roo.log(action);
if(this.fireEvent('beforeaction', this, action) !== false){
- Roo.log('in!!!');
this.beforeAction(action);
action.run.defer(100, action);
}
this.fireEvent('actioncomplete', this, action);
}else{
- Roo.log('go into the fail??');
+
// failure condition..
// we have a scenario where updates need confirming.
// eg. if a locking scenario exists..
return;
}
- Roo.log(o.failure);
- Roo.log(o.scope);
+
Roo.callback(o.failure, o.scope, [this, action]);
// show an error message if no failed handler is set..
if (!this.hasListener('actionfailed')) {
);
*/
}
- Roo.log('got the end??!!');
+
this.fireEvent('actionfailed', this, action);
}
var o = this.options;
var method = this.getMethod();
var isPost = method == 'POST';
- Roo.log(o);
- Roo.log(this.form.isValid());
if(o.clientValidation === false || this.form.isValid()){
- Roo.log('got here');
+
if (this.form.progressUrl) {
this.form.findField('UPLOAD_IDENTIFIER').setValue(
(new Date() * 1) + '' + Math.random());
this.uploadProgress();
}else if (o.clientValidation !== false){ // client validation failed
- Roo.log('got fail??');
this.failureType = Roo.form.Action.CLIENT_INVALID;
this.form.afterAction(this, false);
}