PDA

View Full Version : Direct Form masking



tayyabah
19 Oct 2010, 10:23 PM
When I was using the normal form submit then I can use the masking. Here is the code:


buttons:[{
text:'Login',
id: 'loginBtn',
formBind: true,
type: 'submit',
handler:function(){
login.getForm().submit({
method:'POST',
waitTitle : 'Connecting',
waitMsg : 'Sending data...',

success:function(){

},


failure:function(form, action){

}

});
}
}]

But When I use the direct method then how can I use masking? Here is the code for submit using directFn.



buttons:[{
text:'Save',
id: 'save-setting-btn',
formBind: true,
handler:function(){
SettingController.updateMetaData(settingForm.getForm().el, function(result, e){
if(e.result.success){
Ext.MessageBox.alert("Success");
}else{
Ext.MessageBox.alert("Failure", Ext.encode(e.result.errors));
}
});
}]


Can anyone help me in this regard?

Condor
19 Oct 2010, 11:00 PM
Why not keep using your first method and specify:

api: {submit: SettingController.updateMetaData}
in your form config?

tayyabah
20 Oct 2010, 4:38 AM
Thanks. My problem is solved :-)

iskipper
22 Oct 2010, 7:09 AM
tayyabah, can you please publish your final listing? I can't solve similar problem.