I am currently looking to dynamically add check boxes to a view from a controller in ExtJS.
New data will be sent, and I wish to add check boxes to enable or disable things being shown. I have an idea on how I will do the enabling and disabling, but I am stuck on trying to add to the view.
I have tried
This.lookupReference('config').menu.config.items(push({
xtype: 'checkbox',
fieldLabel: 'test 2',
checked: false
}));
This only worked when I reopened the window.
I tried searching for a way to refresh the view, but I could not find a way.
Is there a better way to achieve this functionality?
EDIT: in particular I need to refresh the tbar.
EDIT 2: View's tbar
tbar: {
xtype: 'toolbar',
layout: {
overflowHandler: 'Menu'
},
items: [ '->', {
text: 'Config',
reference: 'graphConfig',
menu: {
items: [{
xtype: 'checkbox',
fieldLabel: 'Test Checkbox',
checked: false,
}]
}
}]
}