viewModel 数据绑定
formulas 中的数据a,即便没有用于绑定,初始化也也会执行get函数,debugger生效 viewModel: { data: {allowEdit: true}, formulas: { a:{ get:function(){ debugger -------------------------------------------------------------------------
var rec = new XS.model.User({ id: 12, name: 'Foo' }); var viewModel = new Ext.app.ViewModel({ links: { theUser: { type: 'xsT_comeg8989o', id: 17 } }, data: { otherUser: rec } }); viewModel.bind('{otherUser.name}', function(v) { console.log(v+'afasfasfasfafafasdf'); }); viewModel.set('otherUser.name',999)