Hi;
I have an MVC ST2.1 app with a single main controller as follows:
Code:
refs: {
homeBtn:'#titlebarHomeBtn',
},
control: {
homeBtn: {
tap: 'homeBtnTapped'
}
}
.....
homeBtnTapped: function(btn,ev){...}
my main view is a simple container with a card layout. card 0 has a single button (lets call it 'go'). card 1 does not yet exist...
when pressing the 'go' button on card 0 the controller adds a view (card 1) with the home button as follows:
Code:
Ext.define('DynView', {
extend: 'Ext.Container',
requires: [ ... ],
config: {
layout: 'fit',
items:[{
xtype: 'titlebar',
docked: 'top',
items: [
{
id: 'titlebarHomeBtn',
iconCls: 'home',
iconMask: true,
align: 'left'
}
]
}
]
}
});
now, it when pressing the home button the contoller's homeBtnTapped function is called and its code switches to card 0 and destroys card 1.
Now for the second time, if I click the 'go' button, card 1 is dynamically created but the home button does not work. as if the refs/control only bonded once and cannot bind again.
is this a know behavior?
thanks.