ext缺少对象问题

shoujian11 2013-11-06 10:21:51
/*
* Ext JS Library 2.3.0
* Copyright(c) 2006-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/

Ext.onReady(function(){

// Ext.lib.Ajax.defaultPostHeader+=';charset=utf-8';

Ext.QuickTips.init();

// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';

var bd = Ext.getBody();

// Define the Grid data and create the Grid
var myData = [
['G101','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['G11','8:00','13:09','05:09','1','--','1','1','--','--','--','--','--','--','--',100],
['G107','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['D315','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['G1','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['G113','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['G115','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['G41','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100],
['D317','7:00','12:36','05:36','6','--','1','1','--','--','--','--','--','--','--',100]
];

var ds = new Ext.data.Store({
reader: new Ext.data.ArrayReader({}, [
{name: 'checi'},
{name: 'fazhan', type: 'String'},
{name: 'daozhan', type: 'String'},
{name: 'lishi', type: 'String'},
{name: 'shangwu', type: 'String'},
{name: 'tedeng', type: 'String'},
{name: 'yideng', type: 'String'},
{name: 'erdeng', type: 'String'},
{name: 'gaoji', type: 'String'},
{name: 'ruanwo', type: 'String'},
{name: 'yingwo', type: 'String'},
{name: 'ruanzuo', type: 'String'},
{name: 'yingzuo', type: 'String'},
{name: 'wuzuo', type: 'String'},
{name: 'qita', type: 'String'},
{name: 'piaojia', type: 'int'}
])
});
// ds.loadData(myData);

// example of custom renderer function
function italic(value){
return '<i>' + value + '</i>';
}



// the DefaultColumnModel expects this blob to define columns. It can be extended to provide
// custom or reusable ColumnModels
var colModel = new Ext.grid.ColumnModel([
{id:'checi',header: "车次", width: 50, sortable: true, locked:false, dataIndex: 'checi'},
{header: "发站", width: 75, sortable: true, dataIndex: 'fazhan'},
{header: "到站", width: 75, sortable: true, dataIndex: 'daozhan'},
{header: "历时", width: 120, sortable: true, dataIndex: 'lishi'},
{header: "商务座", width: 50, sortable: true, dataIndex: 'shangwu'},
{header: "特等座", width: 50, sortable: true, dataIndex: 'tedeng'},
{header: "一等座", width: 50, sortable: true, dataIndex: 'yideng'},
{header: "二等座", width: 50, sortable: true, dataIndex: 'erdeng'},
{header: "高级软卧", width: 50, sortable: true, dataIndex: 'gaoji'},
{header: "软卧", width: 50, sortable: true, dataIndex: 'ruanwo'},
{header: "硬卧", width: 50, sortable: true, dataIndex: 'yingwo'},
{header: "软座", width: 50, sortable: true, dataIndex: 'ruanzuo'},
{header: "硬座", width: 50, sortable: true, dataIndex: 'yingzuo'},
{header: "无座", width: 50, sortable: true, dataIndex: 'wuzuo'},
{header: "其他", width: 50, sortable: true, dataIndex: 'qita'},
{header: "票价", width: 50, sortable: true, dataIndex: 'piaojia'}
]);
//

/*
* Here is where we create the Form
*/
var gridForm = new Ext.FormPanel({
id: 'tickets-form',
frame: true,
labelAlign: 'left',
title: '购票系统',
width: 1000,
layout: 'column',
items: [{
xtype:'fieldset',
autoHeight: true,
items:[
{
xtype:'textfield',
name: 'txt-test1',
fieldLabel:'*出发地',
allowBlank:false
},
{
xtype:'textfield',
name:'txt-test2',
fieldLabel:'*目的地',
allowBlank:false
},
{
xtype:'datefield',
name:'date1',
fieldLabel:'*出发日期',
allowBlank:false
},new Ext.form.TimeField({
fieldLabel:'出发时间',
name:'time1',
minValue:'8:00am',
maxValue:'6:00pm'
}),{
xtype:'textfield',
fieldLabel:'出发车次',
name:'txt-test3'
},
{
buttons:[{
text:'查询',
handler:function(){
ds.loadData(myData);
}
},{
text:'重置',
handler:function(){
gridForm.getForm().reset();
}
}]
}]
},{
xtype: 'radiogroup',
itemCls: 'x-check-group-alt',
fieldLabel: '票型',
allowBlank: false,
anchor: '95%',
items: [{
columnWidth: '.33',
items: [
{xtype: 'label', text: '类别1', cls:'x-form-check-group-label', anchor:'-15'},
{boxLabel: '成人', name: 'rb-cust1', inputValue: 1,checked:true},
{boxLabel: '老人/儿童/学生', name: 'rb-cust1', inputValue: 2}
]
},{
columnWidth: '.33',
items: [
{xtype: 'label', text: '类别2', cls:'x-form-check-group-label', anchor:'-15'},
{boxLabel: '团体票(15张以上起售)', name: 'rb-cust2', inputValue: 3},
{boxLabel: '个人票', name: 'rb-cust2', inputValue: 4,checked:true}
]
},{
columnWidth: '.34',
items: [
{xtype: 'label', text: '类别三', cls:'x-form-check-group-label', anchor:'-15'},
{boxLabel: '套票(两张成人票,一张儿童票)', name: 'rb-cust3', inputValue: 5},
{boxLabel: '非套票', name: 'rb-cust3', inputValue: 6,checked:true}
]
}]
},{
layout: 'fit',
items: {
xtype: 'grid',
ds: ds,
cm: colModel,
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
rowselect: function(sm, row, rec) {
Ext.getCmp("tickets-form").getForm().loadRecord(rec);
}
}
}),
autoExpandColumn: 'checi',
height: 350,
border: true,
listeners: {
render: function(g) {
g.getSelectionModel().selectRow(0);
},
delay: 10 // Allow rows to be rendered.
}
}
}],
renderTo: bd
});


});

在ie运行调试的时候,ext-all-debug会报缺少对象错误
错误语句是:v = f.convert(v, n);
求大神来给个解决方法啊!!!!!!!!
...全文
477 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
一定是访问了页面没有定义的对象。

50,530

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧