ext extend异常

ext最简单的继承:firebug总是显示H is undefined错误。
源码如下:
myPanel = Ext.extend(Ext.grid.Panel, {
RoleId : null,
constructor : function(_cfg) {
if (_cfg == null)
_cfg = {};
myPanel.superclass.constructor.call(this, {
width : 250,
height : 230,
plain : true,
modal : true
})
}
});
Ext.onReady(function() {
Panel = new myPanel({
RoleId : "hello"
});
})
是哪里出错了呢。。

Ext3.X的吗?Grid组件全名是: Ext.grid.[b]Grid[/b]Panel
不要写错了。。。

你搜一下 有没有H这个变量

你是不是有两个h 重复了冲突了

Order=Ext.extend(Ext.grid.EditorGridPanel,{
addWin : null,
iconCls : 'icon-grid',
constructor : function(_cfg){
if(_cfg==null){
_cfg={};
}
function render(val){
return ''+val+'';
};
function rend(val){
return ''+val+'';
};
Ext.apply(this,_cfg);
this.addWin = new OrderAddWin();
this['store'] = new Ext.data.JsonStore({
url:'findAllOrder.action',
totalProperty : 'totalProperty',
root : 'root',
fields : ["id","orderNum","orderCount","planSurplus","produceSurplus","produceQty","clientMaterial","materialNum","phoneType","remark"]
});
Order.superclass.constructor.call(this,{
id : 'orderGrid',
title : '工单信息',
border : false,
stripeRows : true,
iconCls:'icon-grid',
frame:true,
viewConfig : {
autoFill : true,
foreceFit : true
},
cm : new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
{header:'工单号',width:65,sortable:true,dataIndex:'orderNum',align:'center',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:false,maxLength:20})},
{header:'工单数量',width:65,sortable:true,dataIndex:'orderCount',align:'center',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:true,maxLength:20})},
{header:'计划可分配数量',width:65,sortable:true,align:'center',renderer:rend,dataIndex:'planSurplus'},
{header:'待生产数量',width:65,sortable:true,align:'center',renderer:render,dataIndex:'produceSurplus'},
{header:'已生产数量',width:65,sortable:true,align:'center',dataIndex:'produceQty'},
{header:'客户料号',width:65,sortable:true,align:'center',dataIndex:'clientMaterial',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:true,maxLenght:20})},
{header:'物料编号',width:65,sortable:true,align:'center',dataIndex:'materialNum',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:true,maxLenght:20})},
{header:'机种名称',width:65,sortable:true,align:'center',dataIndex:'phoneType',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:true,maxLenght:20})},
{header:'定制信息',width:65,sortable:true,align:'center',dataIndex:'remark',menuDisabled:true,editor:new Ext.form.TextField({allowBlank:true,maxLenght:20})}])
,
loadMask:{
msg:'正在加载数据,请稍候...'
},
sm : new Ext.grid.RowSelectionModel({singleSelect:true}),
tbar : [{
xtype:'textfield',
id:'orderName',
emptyText : '请输入查询条件!',
listeners : {
'specialkey' : function(field,e){
if(e.getKey()==Ext.EventObject.ENTER){
this.onSearchOrder();
}
},
scope : this
}
},{
text:'查询',
handler : this.onSearchOrder,
iconCls : 'icon-search',
scope : this
},'-',{
text : '新建',
handler : this.onAddOrder,
iconCls : 'icon-add',
scope : this
},'-',{
text:'删除',
iconCls:'icon-del',
scope : this,
handler: this.onDelOrder
},'-',{
text:'导入EXCEL',
iconCls:'icon-excel',
handler:this.onExport
//scope : this
}],
bbar : new Ext.PagingToolbar({
pageSize : 25,
store : this['store'],
displayInfo : true,
displayMsg : '第 {0} - {1} 条 共 {2} 条',
emptyMsg : "没有记录"
}),
listeners : {
'afteredit' : function(_e){this.onAfterEidit(_e)},
scope : this
}
});
this.getStore().load({params : {start : 0,limit : 25}});
},
onSearchOrder : function(){
this.getStore().baseParams = {
conditions:Ext.getCmp('orderName').getValue()
}
this.getStore().load({params : {start : 0,limit : 25}});
},
onAddOrder : function(){
this.addWin.show();
},
onDelOrder : function(){
record =Ext.getCmp('orderGrid').getSelectionModel().getSelected();
if(record){
Ext.Msg.confirm("系统信息","你确定删除该用户信息?",function(btn){
if(btn=="yes"){
Ext.Ajax.request({
url : 'deleteOrder.action',
mothod : 'post',
params : {id : record.data.id},
success : function(){
Ext.Msg.show({
title : '系统信息',
msg : '删除成功!',
buttons : Ext.Msg.OK,
fn : function(){
Ext.getCmp('orderGrid').getStore().remove(record);
},
icon : Ext.Msg.INFO
});
},
failure : function() {
Ext.Msg.show({
title : '错误提示',
msg : '删除时发生错误!',
buttons : Ext.Msg.OK,
icon : Ext.Msg.ERROR
});
},
scope : this
});
}
});
}else{
Ext.Msg.show({title : "系统提示",msg:'请选择你要删除工单',buttons : Ext.Msg.OK,icon:Ext.Msg.INFO})
}
},
onAfterEidit : function(_e){
Ext.Ajax.request({
url : 'updateOrder.action',
params : {
fieldName : _e.field,
fieldValue : _e.value,
id : _e.record.data.id
},
success : function(){
Ext.Msg.show({
title : '系统信息',
msg : '修改成功',
buttons : Ext.Msg.OK,
icon : Ext.Msg.INFO
})
},
failure : function(){
Ext.Msg.show({
title : '错误提示',
msg : '修改数据发生错误,操作将被回滚!',
buttons : Ext.Msg.OK,
icon : Ext.Msg.ERROR
})
}
})
},
onExport : function(){
var showWin = new ExportOrderWin({
buttons : [{
text:'导入',
handler : function(){
var frm=Ext.getCmp('form').getForm();
if(frm.isValid()==true){
frm.submit({
url : 'exportOrder.action',
waitTitle : '请稍候',
waitMsg : '正在提交表单数据,请稍候...',
success : function(frm,action){
Ext.Msg.show({
title : '系统信息',
msg : '操作成功'+action.result.reMesage,
buttons : Ext.MessageBox.OK,
icon : Ext.Msg.INFO
});
frm.getEl().dom.reset();
Ext.getCmp('orderGrid').getStore().reload();
},
failure : function(){
Ext.Msg.show({
title : '错误提示',
msg : '导入失败',
buttons : Ext.Msg.ERROR,
fn : function(){
btn.enable();
},
icon : Ext.Msg.ERROR
});
}
});
}
}},{
text : '清空',
scope : this,
handler : function(){
Ext.getCmp('form').getForm().getEl().dom.reset();
}
}]
}).show();
}
})

额 你QQ多少我发个DEMO你