- 爱易网页
-
Java教程
- form.getForm.submit对象不支持此属性或步骤
日期:2014-05-17 浏览次数:20724 次
form.getForm.submit对象不支持此属性或方法
用EXT写的formpanel,不知道为什么报这个错误,我在写addDaily_form.getForm.submit的时候,在打“点”时也不提示相应的函数信息,不知道哪里错误,请大家帮忙!
Ext.onReady(function(){
Ext.QuickTips.init();
// 表格配置开始
var sm = new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),sm,
{
header:'编号',
dataIndex:'id',
width: 50
}, {
header:'标题',
dataIndex:'title'
// width: 20
}, {
header:'内容',
dataIndex:'content'
//width:50
},{
header:'报送人',
dataIndex:'poster'
//width: 20
}, {
header:'报送时间',
dataIndex:'posttime',
//width: 10,
type:'date',
render: Ext.util.Format.dateRenderer('Y年m月d日')
}]);
store = new Ext.data.Store({
reader : new Ext.data.JsonReader({
totalProperty : "totalProperty",
root : "getAlldailyList",
fields : [{
name:'id'
},{
name:'title'
},{
name:'content'
},{
name:'poster'
},{
name:'posttime'
}]
}),
proxy:new Ext.data.HttpProxy({
url:'daily.do?method=getAlldailyList'
})
});
// 分页栏
//添加日志
addDailyFn = function(){
var addDaily_form = new Ext.form.FormPanel({
labelAlign :'right',
labelWidth :50,
width : 600,
title : '添加日志',
url : '/daily.do?method=addDaily',
frame : true,
items :[{
layout :'column',
items :[{
column :2,
xtype :'fieldset',
checkboxToggle :true,
title :'单纯输入',
autoHeight:true,
defaults:{width:300},
defaultType:'textfield',
items:[{
fieldLabel:'标题',
emptyText : '请输入标题...',
name:'title',
allowBlank : false,
maxLength : 100
},{
xtype:'datefield',
fieldLabel:'日期',
name:'posttime'
}]
},{
layout:'form',
labelAlign:'top',
items:[{
xtype:'htmleditor',
fieldLabel:'内容',
height : 350,
id:'editor',
anchor:'98%',
name : 'content'
}]
}]
}],
buttons :[{
text :'确定',
handler : function() {
addDaily_form.getForm.submit//这句出错了({
params : {
node : '1'
},
success:function(form, action){
Ext.Msg.alert('信息','添加成功!');
},
failure:function(){
Ext.Msg.alert('错误','操作失败!');
}
})
}
}]
})
var addDaily_win = new Ext.Window({
title : '添加日志',
layout : 'fit',
width : 850,
height : 510,
closeAction : 'close',
modal : true,
plain : true,
constrain : true,
items : [addDaily_form]
})
addDaily_win.show();
}
// 全部表格
var gridTbar = [];
//if (isSuperAdmin == "true" || hasManagerRight) {
gridTbar = [new Ext.Button({
text : "添加日志",
handler : addDailyFn
}), "-", new Ext.Button({
text : "修改日志"
//handler : updateFileFn
}), "-", new Ext.Button({
text : "删除日志"
//handler : delFileFn
})];
//}
var grid = new Ext.grid.GridPanel({
autoHeight: true,
tbar : gridTbar,
loadMask : true,
renderTo: 'grid',
store: store,
cm: cm,
sm: sm
});
store.load();
});