I want to adding allow Blanks 's config when i click on a node in my Tree Panel ! if node is a leaf , i want to put name field's config : allowBlank : false and if not a leaf , allowBlank : true . I don't find method to do this ?!
Thanks a lot :)
Thanks to your answer but my combobox is not a global variable :
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'
}
I need to access to the combobox component by id maybe ? There are solutions to acess to this component into items to items ?
Set an id
property for the desired combo box (id: 'anyId'
), and use Ext.apply(Ext.getCmp('anyId'), {your config object});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With