function(list) {
        var store = list.getStore();

        return Ext.Array.sort(list.getSelectionModel().getSelection(), function(a, b) {
            a = store.indexOf(a);
            b = store.indexOf(b);

            if (a < b) {
                return -1;
            } else if (a > b) {
                return 1;
            }
            return 0;
        });
    }
function(list) {
        var store = list.getStore();

        return Ext.Array.sort(list.getSelectionModel().getSelection(), function(a, b) {
            a = store.indexOf(a);
            b = store.indexOf(b);

            if (a < b) {
                return -1;
            } else if (a > b) {
                return 1;
            }
            return 0;
        });
    }
function ( list ) { var store = list . getStore ( ) ; return Ext . Array . sort ( list . getSelectionModel ( ) . getSelection ( ) , function ( a , b ) { a = store . indexOf ( a ) ; b = store . indexOf ( b ) ; if ( a < b ) { return - 1 ; } else if ( a > b ) { return 1 ; } return 0 ; } ) ; }
Get the selected records from the specified list.

Records will be returned *in store order*, not in order of selection.
@param {Ext.view.BoundList} list The list to read selections from.
@return {Ext.data.Model[]} The selected records in store order.
Get the selected records from the specified list .