I have the following component:
{ xtype: 'fieldcontainer', layout: 'hbox', id: 'article-level-container', defaultType: 'textfield', fieldDefaults: { labelAlign: 'top' }, items: [{ fieldLabel: 'LEVEL', name: 'artLevel', inputWidth: 216, margins: '0 5 5 0', allowBlank: false, fieldStyle: 'text-align: right; font-size: 13pt; background-color: #EAFFCC;' }, { fieldLabel: 'VALUE', name: 'artValue', inputWidth: 216, allowBlank: false, blankText: 'zorunlu alan, boş bırakılamaz', fieldStyle: 'text-align: right; font-size: 13pt; background-color: #EAFFCC;', listeners: { change: function(textfield, newValue, oldValue) { if (oldValue == 'undefined' || newValue == '') { Ext.getCmp('btnArticleSave').disable(); } else { Ext.getCmp('btnArticleSave').enable(); } } } }] }
I want to get the value of the second fieldLabel element (in this case VALUE).
- How to get this field value outside the
onReady function? - How can I change this field label with a new value (I want to change the field label with the selected combo box value)
UPDATE I tried the following:
var artField = Ext.ComponentQuery.query('#articleValueField'); console.log(artField);

javascript extjs
Oğuz Çelikdemir
source share