Spenna
4 Jan 2012, 6:53 AM
Hello everyone.
I have a composite component defined as a view that i 'share' across forms in my app. It contains two combos, and i want to pre-load the items in the first combo from within the view itself. However the store for the combo must be filtered based on a property that i set dynamically in the application - so i want do do something like this:
// in view file
Ext.getStore('Warehouses').filters.clear();
Ext.getStore('Warehouses').filter([
{property:'company_id', value: this.application.getActiveUser().get('company_id')},
{property:'type', value: 'warehouse'}
]);
Ext.getStore('Warehouses').load(); // preload combo
Anyone have a clue how to achieve this?
I have a composite component defined as a view that i 'share' across forms in my app. It contains two combos, and i want to pre-load the items in the first combo from within the view itself. However the store for the combo must be filtered based on a property that i set dynamically in the application - so i want do do something like this:
// in view file
Ext.getStore('Warehouses').filters.clear();
Ext.getStore('Warehouses').filter([
{property:'company_id', value: this.application.getActiveUser().get('company_id')},
{property:'type', value: 'warehouse'}
]);
Ext.getStore('Warehouses').load(); // preload combo
Anyone have a clue how to achieve this?