I want to add allow blanks config when I click on node in my tree panel! if node is a leaf, I want to put the configuration of the name field: allowBlank: false and if not the leaf, allowBlank: true. I did not find a way to do this ?!
Many thanks:)
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 the combobox component by id, maybe? Are there solutions for accessing this component in elements for elements?