Nested isn't working, another approach, add trans validations

User a transactions border, select the customer from a view of users and customers
This commit is contained in:
Jason Denney
2013-01-20 14:57:43 -05:00
parent 31935f6f7e
commit 1b7daa45ca
5 changed files with 74 additions and 49 deletions
@@ -0,0 +1,17 @@
{
initComponent: function(){
// calling superclass's initComponent
this.callParent();
// setting the 'rowclick' event
var user_view = this.getComponent('users').getView();
var customer_view = this.getComponent('users').getView();
user_view.on('itemclick', function(view, record){
// The beauty of using Ext.Direct: calling 3 endpoints in a row, which results in a single call to the server!
this.selectCustomer({customer_id: record.get('id'), customer_type: 'User'});
}, this);
customer_view.on('itemclick', function(view, record){
this.selectCustomer({customer_id: record.get('id'), customer_type: 'Customer'});
}, this);
}
}