首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

extjs报’id'为空或不是对象,哎,真垃圾!

2012-02-14 
extjs报’id为空或不是对象,哎,真垃圾!!! - Web 开发 / Ajax请帮忙看看吧,找不到原因啊。谢谢了!JScript co

extjs报’id'为空或不是对象,哎,真垃圾!!! - Web 开发 / Ajax
请帮忙看看吧,找不到原因啊。谢谢了!

JScript code
/** 专题班评价的JS页面*/Ext.onReady(function(){//数据var store= new Ext.data.Store({                          reader:new Ext.data.JsonReader({                       root : 'root',                                             idProperty:'courseName', //********必须加!!!                       totalProperty : 'totalCount',                       fields:[{                                name : 'courseName'                                                            }                               ]}),                      proxy : new Ext.data.HttpProxy({                             url : ctPath +'/EvaluationAction!getEvalueResultInfo.do'                    }),                    sortInfo :{field: "courseName", direction: "ASC"},                    remoteSort: true            }); //用于显示的GridPannel,主窗口************************************************** //主面板gridvar sm=new Ext.grid.CheckboxSelectionModel();var ztevalgrid=new Ext.grid.GridPanel({                                //title:'专题班评估',                                renderTo:'evaluation-div',                                 width:Ext.getCmp("tabpanel").getInnerWidth()-2,                                height:Ext.getCmp("tabpanel").getInnerHeight()-2,                                sm:sm,                                store:store,                                tbar:[                                new Ext.ux.form.SearchField({                                    store : store,                                       width : 260                                    //data: ''                                }),{                                        text:'评价',                                        handler:function(){                                                            //ztb_evalue.show();                                                          },                                        iconCls : "icon-add"                                       }],                                                                columns:[                                        sm,                                        {id:'courseName',header:'专题班名称',width:230,dataIndex:'courseName',sortable:true},                                        //{header:'专题班代码',width:100,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'总分',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'培训设计',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'培训实施',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'培训管理',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'培训效果',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'评估率',width:80,dataIndex:'evaluCourseId',sortable:true},                                        //{header:'备注',width:130,dataIndex:'evaluCourseId',sortable:true}                                        ],                                bbar: new Ext.PagingToolbar({                                        pageSize: 25,                                        store: store,                                        displayInfo: true                                     })                                });                                  //用于显示的GridPannel,主窗口^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^       //数据载入 ******必须加!!!           store.load({        params : {            start : 0,            limit : 15        }    }); })


[解决办法]
,,,,,,LZ
淡定
------解决方案--------------------


用spket插件开发~~就不会犯这样的错误了
[解决办法]
这是ext的语法,习惯了就好,主要是没有一个像java那种的开发工具。

探讨
问题找到了! {id:'courseName',header:'专题班名称',width:230,dataIndex:'courseName',sortable:true}, 这里多了一个逗号!


操! ext 去死!

热点排行