当我单击树面板中的节点时,我想添加允许空白的配置!如果节点是叶子,我想输入名称字段的配置:allowBlank:false,如果不是叶子,allowBlank:true。我没有找到方法来做到这一点?!
非常感谢 :)
感谢您的回答,但我的组合框不是全局变量:
var monPrepanel = Ext.create('Ext.form.Panel',{
frame : true,
title : 'Editing Zone',
//renderTo : 'mesfields',
//width : 750,
forceFit : true,
items: [{
xtype:'fieldset',
title: 'Add Task : ',
margin : '20 20 20 20',
collapsible: true,
defaultType: 'textfield',
defaults: {anchor: '100%'},
layout: 'anchor',
items: [ {
itemId : 'p0',
allowBlank : false,
xtype : 'textfield',
anchor : '60%',
padding : '0 30 0 30',
fieldLabel : 'Task',
name : 'task'
} , {
itemId : 'p1',
allowBlank : false,
xtype : 'combobox',
anchor : '40%',
store : materialstore,
queryMode: 'local',
displayField: 'data',
width : 50,
valueField: 'data',
editable : false,
padding : '0 30 0 30',
fieldLabel : 'Material',
name : 'material'
} , {
allowBlank : true,
xtype : 'combobox',
anchor : '40%',
store : ccstore,
queryMode: 'local',
displayField: 'data',
width : 50,
valueField: 'data',
editable : false,
padding : '0 30 0 30',
fieldLabel : 'CC',
name : 'cc'
}
我可能需要通过 id 访问组合框组件?有没有解决方案可以将此组件访问到项目到项目?