Trying to figure out how to use the new view model's in ExtJS 5. The docs seem to be a little lacking or I am not looking at the right place.
I understand how to use references to bind to components.
The part that I am missing is the docs that explain how to bind the viewmodel data based on the events that place....
for example....take a grid...i found this code on Google that shows me how to update the data in the view model when a user clicks a row
The Key to it working is the someGridReference.selection bind parameter... But that is only for a grid selection...what about the other 1000's of events that can happen....where do i find the docs that show me all these??
I understand how to use references to bind to components.
The part that I am missing is the docs that explain how to bind the viewmodel data based on the events that place....
for example....take a grid...i found this code on Google that shows me how to update the data in the view model when a user clicks a row
Code:
formulas:{ // current customer is bound to automatically published selection currentCustomer:{ bind:'{customersList.selection}' ,get:function(customer) { // this is core of the trick // whenever selection changes, this method is called // so we also update current.customer that is defined // in the main view model this.set('current.customer', customer); return customer; } // eo function get (currentCustomer) } // eo currentCustomer } // eo formulas
Comment