javascript - How to add components to a View from a Controller in ExtJS5? -


i looking dynamically add check boxes view controller in extjs.

new data sent, , wish add check boxes enable or disable things being shown. have idea on how enabling , disabling, stuck on trying add view.

i have tried

this.lookupreference('config').menu.config.items(push({         xtype: 'checkbox',         fieldlabel: 'test 2',         checked: false     })); 

this worked when reopened window.

i tried searching way refresh view, not find way.

is there better way achieve functionality?

edit: in particular need refresh 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,         }]     } }] } 

you can use add() or insert() methods of ext.container.container or extension.

fiddle illustrate

just select proper component want add checkboxes, describe approaches in fiddle comments + can check question / answer.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -