未显示ExtJs FormPanel按钮
我试图在我的应用程序中构建一个FormPanel,由一个字段和两个按钮组成。 问题是,当显示textfield时,视图上没有显示按钮 这是Login.js视图:未显示ExtJs FormPanel按钮,extjs,sencha-touch-2,formpanel,Extjs,Sencha Touch 2,Formpanel,我试图在我的应用程序中构建一个FormPanel,由一个字段和两个按钮组成。 问题是,当显示textfield时,视图上没有显示按钮 这是Login.js视图: Ext.define('appTrial.view.Login',{ extend: 'Ext.form.Panel', xtype: 'Login', alias: 'widget.Login', config : { id : 'LoginId', title : 'Welcome', resizable
Ext.define('appTrial.view.Login',{
extend: 'Ext.form.Panel',
xtype: 'Login',
alias: 'widget.Login',
config : {
id : 'LoginId',
title : 'Welcome',
resizable : false,
collapsible : true,
bodyPadding : '5',
buttonAlign : 'center',
border : false,
trackResetOnLoad : true,
items : [{
docked: 'top',
xtype: 'titlebar',
title: 'Welcome to My New App!!!'
},
{
xtype: 'container',
name: 'mainContainer',
layout: {
type: 'vbox',
align: 'center',
pack: 'center'
},
//width : '100%',
items : [{
layout: {
pack: 'center'
},
html :'Associa attivita',
margin: '80 0 0 0'
},{
xtype: 'fieldset',
items: [{
xtype: 'textfield',
name: 'codAttivita'
}]
}],
buttons :[{
text : 'Associa',
itemId : 'btnAssocia',
formBind : true,
ui: 'confirm'
},{
text : 'Reset',
itemId : 'btnReset',
formBind : true,
ui: 'decline'
}]
}]
}
});
有人知道吗?
提前感谢容器没有“配置”按钮。您必须将按钮配置定义到formpanel对象中。我试图将按钮放在config属性内的同一级别的项中,但仍然无法工作