extjs form.load()加载服务端数据

        formPanel.getForm().load({
                     url: 'getApproveRefundInf?refundIdDetail=${refundIdDetail}',
                     waitMsg: '请稍后......',
                     success : function(form, action) {
                         var data=action.result.data;
                         if(data.refundDetailState=='01'&&data.approvalDetailState=='02'){
                             Ext.getCmp('approveButton').setDisabled(true);
                         }
                    },
                     failure: function(form, action) {
                     Ext.Msg.show({
                         title:'操作失败',
                         msg: action.result.msg,
                         buttons: Ext.Msg.YES,
                         icon: Ext.MessageBox.QUESTION,
                         closable:false,
                         fn: function(){
                             window.close();
                         }
                      });
                  }
             });

这是官网的API:http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.action.Load

posted @ 2016-02-23 20:58  java渣渣  阅读(2226)  评论(0编辑  收藏  举报