Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10859 closed defect (fixed)

QueryReadStore: nested sorting does not work

Reported by: jacobsenj Owned by: evan
Priority: high Milestone: 1.5
Component: DojoX Data Version: 1.4.2
Keywords: nested sorting, enhanced grid Cc: Jared Jurkiewicz
Blocked By: Blocking:

Description

I'm using Firefox on Mac OS 10.6.2 and Dojo 1.4.2.

When trying to use nested sorting on an enhanced grid with a QueryReadStore?, the nested sorting does not get reflected in the parameters (either GET and POST). Only the default sort parameter is beiing attached to the store url (&sort=...).

In the attached screenshot you can see the sort parameter for the first level sort being attached properly in the first line. In the second line the call should be extended with the second level sort.

Code used: var articleListStore = new dojox.data.QueryReadStore?({url: "/index/dojodata"}); ...

articleListGrid = new dojox.grid.EnhancedGrid?({

store: articleListStore, structure: articleListLayout, clientSort: true, nestedSorting: true, rowSelector: '20px', plugins: {

nestedSorting: true, dnd: true, indirectSelection: {name: ' ', width: '25px', styles: 'vertical-align:middle;text-align:center;height:25px;'}

}

}, document.createElement('div'));

...

Attachments (1)

no_parameter_for_nested_sort.png (5.7 KB) - added by jacobsenj 9 years ago.
Calls when clicking first level and then a nested second level sort (from Firebug console)

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by jacobsenj

Calls when clicking first level and then a nested second level sort (from Firebug console)

comment:1 Changed 9 years ago by Adam Peller

Owner: changed from bryanforbes to Evan

comment:2 Changed 9 years ago by evan

Actually this is due to nested sorting not being supported in QueryReadStore? which only picks the first level sorting parameter, please see line 381 of dojox/data/QueryReadStore:

if(!this.doClientSorting){

if(request.sort){

var sort = request.sort[0]; if(sort && sort.attribute){

var sortStr = sort.attribute; if(sort.descending){

sortStr = "-" + sortStr;

} serverQuery.sort = sortStr;

}

}

}

will provide a simple patch in a while.

comment:3 Changed 9 years ago by Adam Peller

Cc: Jared Jurkiewicz added

comment:4 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [21685]) Patch from Evan. Nested sorting was not supported in QueryReadStore?, which only picked the first level sorting parameter Fixes #10859

comment:5 Changed 9 years ago by bill

Component: DojoX GridDojoX Data
Summary: EnhancedGrid - NestedSorting does not work when using a QueryReadStoreQueryReadStore: nested sorting does not work

Just changing category and summary to reflect real issue.

comment:6 Changed 9 years ago by Adam Peller

Milestone: tbd1.5

comment:7 Changed 9 years ago by bill

Owner: changed from Evan to evan
Note: See TracTickets for help on using tickets.