Closed parente closed 14 years ago
Your sort arg should be an array. sort: [ { attribute: 'label', descending: true } ]
OK. The dojo stores must have up converted for me. Would be nice if Torongo did that to if only a single object is passed.
I don't see any support in dojo.data.util.sorter.js for up converting the arg. I can't see how it can work without an array argument. Can you?
Maybe I was getting lucky and it was defaulting to some order in itemfilereadstore. I tested with about 15 items in my local store at one point and they were sorted in some alphabetical way.
Working.
ms= blank on request URL. Here's what I'm doing in JS:
var req = this.model.fetch({ query: {label : ''+this.query+''}, onBegin: this._onBegin, onItem: this._onItem, onComplete: this._onComplete, onError: this._onError, start: this._page * this.rowSize, // fetch one extra to check if there's a next count: this.rowSize + 1, /queryOptions: { deep: false, ignoreCase: true },/ sort : { attribute : 'label', descending : true }, scope: this });