I did not find how to do this. This is how I do it in my application (with a nested list). I created a controller with this routing:
Ext.define('MyApp.controller.ListItems', {
extend: 'Ext.app.Controller',
config: {
refs: {
nestedList: '.nestedlist'
},
control: {
nestedList: {
itemtap: 'itemSelected'
}
},
routes: {
'item/:id': 'showListItem'
}
},
list: null,
index: null,
target: null,
record: null,
showListItem: function( id ){
var nestedList = this.getNestedList(),
store = nestedList.getStore(),
node = store.getById(id);
if ( node.isLeaf() ){
nestedList.goToLeaf(node);
nestedList.fireEvent('leafitemtap', nestedList, this.list, this.index, this.target, this.record);
} else {
nestedList.goToNode(node);
}
},
itemSelected: function( nl, list, index, target, record ){
this.list = list;
this.index = index;
this.target = target;
this.record = record;
var path = 'item/'+record.data.id;
this.redirectTo(path);
}
});
I also redefined the inItemTap method of the nested list for all changes to the list now performed using the controller and propper routing.
onItemTap: function(list, index, target, record, e){
this.fireEvent('itemtap', this, list, index, target, record, e);
}
Hope this will be helpful. Write here if you find a better way, please.