I have a view that contains a list of orders, in my controller i have a reference to this view and an listener on the 'itemtap' event. When you tap a order a different view needs to be shown which should call upon a different store that will load all the information of that order by passing an orderid as a parameter to that store.

As of now i was unable to find a clear example to use the params config for a store when this store is set in a View. I found a workaround for this but i'm not too happy with it. There has to be a easier way to do this;

Within the itemtap listener:
Code:
var OrderStore = Ext.getStore('OrderStore');        OrderStore.load({
            params: {
                id: record.get('orderid')
            },
            callback: function(records, operation, success) {                
                var OrderContainer = Ext.create('wp-touch.view.OrderView');

                OrderContainer.add({
                    xtype: 'panel',
                    id: records[0].get('id'),
                    html: '<p>Order informatie: ' + records[0].get('orderid')
                });
                
                OrderContainer.add({
                    xtype: 'segmentedbutton',
                    items: [
                            {
                                text: 'Operations',
                                pressed: true
                            },
                            {
                                text: 'Materials'
                            }
                    ],
                    listeners: {
                        toggle: function(container, button, pressed){
                            console.log("User toggled the '" + button.getText() + "' button: " + (pressed ? 'on' : 'off'));
                        }
                    }
                });


                OrderContainer.add({
                    xtype:'list',
                    flex: 1,
                    id: record.get('id'),
                    itemTpl: '{title}',
                    data: [{ title: 'item 1' },
                           { title: 'item 2' },
                           { title: 'item 3' }]
                });
                
                Ext.Viewport.setActiveItem(OrderContainer, { type: 'slide' });
            },
            scope: this
        });
As you can see I'm manually adding all the components i want in the view so i can set the data that is loaded from the OrderStore into this view. A order contains a array of operations and materials and by pressing the segmented buttons you should be able to view these by the list. I'm not sure yet how i'm going to get those arrays into that list but for now i would like to first clean this up.

Is it possible to just enable the OrderView on itemtap and pass the orderid as a parameter to the store that is in the config of this view?