I have 2 viewModel classes with the same link descriptor, Bound to 2 different views. When both views are active, a change to one of the views model calls the formula function on the other viewModel. When they models are constructed, they are assigned different ids. How can I scope a formula bind to its own instance?
two active viewModels with identical link descriptors update both viewModels data
Ext .define('app.viewModel1' , {
extend : ' Ext.app.ViewModel ' ,
links : {
concept : {
type : 'app.model.Concept' ,
create : true
}
},
formulas :{
item :{
bind : {
bindTo : '{ concept }' ,
deep : true
},
get : function (listItem){
},
set : function (value){
}
}}
});
Ext .define('app.viewModel2' , {
extend : ' Ext.app.ViewModel ' ,
links : {
concept : {
type : 'app.model.Concept' ,
create : true
}
},
formulas :{
item :{
bind : {
bindTo : '{ concept }' ,
deep : true
},
get : function (listItem){
},
set : function (value){
}
}}
});
two active viewModels with identical link descriptors update both viewModels data
Aucun commentaire:
Enregistrer un commentaire