投放本站广告请联系:
extjscn#126.com
load数据加载失败的问题,如何调试呢?
这是一段代码,其中doSearch(),加载数据store时,返回false,输出“aaa”,不知道如何去调试一下呢?
请高手帮忙指点。。。Ext.extend(ChangeSearchForm,Ext.FormPanel,{
    //继承私有函数
    afterRender : function(){
        ChangeSearchForm.superclass.afterRender.call(this);
        this.el.on('contextmenu', function(e){
            e.preventDefault();
        });
    },
    
    //重置函数
    doReset:function(){
        this.form.reset();
        this.grid.store.removeAll();
    },
    
    //加载所有comobobox数据
    loadCombobox:function(win){
        //this.coopCombobox.clearValue();
        this.storeCombobox.clearValue();
        
        //var coopComboboxstore = this.coopcomboboxstore;
        var storeComboboxstore = this.storecomboboxstore;
        
        win.body.mask('加载供应商信息……', 'x-mask-loading');
        /* coopComboboxstore.load({
            params:{cooptype:2,type:'search'},
            callback:function(r, options, success){
                if(success){  
                    win.body.unmask();
                    win.body.mask('加载库位信息……', 'x-mask-loading');
                }else{  
                    win.body.unmask();
                    myMsnBox("系统提示信息",'加载供应商信息列表异常,请与管理员联系');  
                }  
            }
        });
        */
	    storeComboboxstore.load({
	        params:{typeId:1,type:'search'},
	        callback:function(r, options, success){
	            if(success){ 
	                win.body.unmask();
	            }else{
	                win.body.unmask();
	                myMsnBox("系统提示信息",'加载库位信息列表异常,请与管理员联系');  
	            }
	        }
	    });
	    
        
    } ,
      
    //查询操作
    doSearch:function(){
        var dbcode = this.codeText.getValue(); 
        //var_dump(dbcode);
        var beginTime = this.changeBeginDate.getRawValue();
        var lastTime = this.changeLastDate.getRawValue();
       // var coopid = this.coopCombobox.getValue();
        var storeid = this.storeCombobox.getValue();
        
        var obj = {};
        obj.dbcode = dbcode;
        obj.beginTime = beginTime ;
        obj.lastTime = lastTime ;
        //obj.coopid = coopid 
        obj.in_storeid = storeid;
        
        var dbFormJson = Ext.encode(obj);
        this.loadDbList(dbFormJson); 
    },
    
    loadDbList:function(dbFormJson){
        //加载数据调用的函数
        this.grid.store.baseParams = {
            parm: dbFormJson
        };
        if( this.grid.store.load({params:{start:0,limit:18} }) )
        {
        	alert("wwww");
        }
        else
        	alert("aaa");
    }
});
- 要发表评论,请先登录



推荐:firebug 可以调试js
firebug 可以调试js,
也可以看到ajax请求了哪些url,
我想成为一个网页设
我想成为一个网页设计师,网站的设计是太棒了。我沉迷于 000-025 和以及000-111。考试/证书。但它是对的方法 000-210 并了解这些概念是很难啃的骨头。