I have created a Window, and added a label. Now i want to access that label using query and set text to that label. How am i suppose to do it ? I need to change the Text of the label (firstlabel) using
Ext.ComponentQuery.query. Can someone help me please ?
Ext.define('ProjectExample.view.ex.FirstWin', {
extend: 'Ext.window.Window',
alias : 'widget.firstW',
items: [
xtype: 'panel',
title: 'First Panel',
items: [{
xtype: 'label',
name: 'firstlabel',
text: 'THIS IS A LABEL'
}]
];
var panelArr = Ext.ComponentQuery.query('panel');
});
You can do:
Here is an example: http://jsfiddle.net/dbrin/XuQg4/