2009年4月15日星期三

如何获取Ext.form.FormPanel的load和submit事件

在使用ExtJs.form.FormPanel的过程中,有很多时候需要获得装载数据完成时的事件,那么一般这种事件怎么获得呢?请看如下示例:


Ext.getCmp('tabs').getForm().on("actioncomplete",
function(from,action){
if(action.type=="submit")
{
console.log(action.result)
}
})

其中Ext.getCmp('tabs')
是假设有一个id=‘tabs’的FormPanel。而action.type就是指事件(action)的类型。目前有两种分别为'submit'和'load'。

没有评论:

发表评论