Right now, the model.Component implementation is a bit more advanced.
Inside Neo.examples.model.advanced.MainContainerController we have the method:
onAddButtonTextfieldButtonClick(data) {
let me = this;
me.getReference('content-container').insert(2, {
items: [{
ntype : 'textfield',
flex : 'none',
labelText : 'data.button2Text:',
labelWidth: 150,
width : 300,
bind: {
value: '${data.button3Text}'
},
listeners: {
change: me.onTextField3Change,
scope : me
}
}]
});
}
It would be nice if we can optionally specify it the same way as inside the MainContainer view as well:
onAddButtonTextfieldButtonClick(data) {
let me = this;
me.getReference('content-container').insert(2, {
items: [{
ntype : 'textfield',
flex : 'none',
labelText : 'data.button2Text:',
labelWidth: 150,
width : 300,
bind: {
value: '${data.button3Text}'
},
listeners: {
change: 'onTextField3Change'
}
}]
});
}
Right now, the model.Component implementation is a bit more advanced.
Inside Neo.examples.model.advanced.MainContainerController we have the method:
onAddButtonTextfieldButtonClick(data) { let me = this; me.getReference('content-container').insert(2, { items: [{ ntype : 'textfield', flex : 'none', labelText : 'data.button2Text:', labelWidth: 150, width : 300, bind: { value: '${data.button3Text}' }, listeners: { change: me.onTextField3Change, scope : me } }] }); }It would be nice if we can optionally specify it the same way as inside the MainContainer view as well:
onAddButtonTextfieldButtonClick(data) { let me = this; me.getReference('content-container').insert(2, { items: [{ ntype : 'textfield', flex : 'none', labelText : 'data.button2Text:', labelWidth: 150, width : 300, bind: { value: '${data.button3Text}' }, listeners: { change: 'onTextField3Change' } }] }); }