In my project, I created widget alias for the below code in "View" as notifications. Now, how to access each and every item in "Controller" ?
extend: 'Ext.panel.Panel',
alias: 'widget.notifications',
layout: 'fit',
items:[{
xtype: 'container',
layout: {type: 'vbox', align: 'stretch'},
items: {
xtype: 'container',
flex:1,
layout: {type: 'vbox', align: 'stretch'},
items:[{
xtype: 'container',
flex: 1,
items: [{
xtype: 'container',
height: 20,
html: "This week",
},
{
xtype: 'container',
flex: 1,
layout: {type: 'vbox', align: 'stretch'},
items: [{
xtype: 'container',
height:20,
html : 'show submit status here'
},
{
xtype: 'container',
flex: 1,
}]
}]
},
{
xtype: 'container',
flex: 1,
layout: {type: 'vbox', align: 'stretch'},
items: [{
xtype: 'container',
height: 20,
html: "This month"
},
{
xtype: 'container',
flex: 1,
layout: {type: 'vbox', align: 'stretch'},
items: [{
xtype: 'container',
html: 'submit status of month here',
height: 20
},
{
xtype: 'container',
flex: 1,
}]
}]
}]
}
}]
I tried:
var notificationView = Ext.widget('NotificationView');
var childItem = notificationView.items.items[0].items.items[0].items.items[0].items.items[0];
Which just gives me headache and many errors.
I also tried using ComponentQuery like this:
var childItem = notificationView.ComponentQuery.query('container>container>container>container');
Which gets only the first child, not the other child items.