PDA

View Full Version : [3.3] GroupingStore and Sorting broken under some situations



Sesshomurai
31 Oct 2010, 5:36 AM
I have a groupingstore with remotesort. It is having difficulty performing a group on field. It does NOT have remoteGroup set.
It sorts remotely fine. But when trying to group it fails. I traced the code and noticed a possible coding error.

This is in the function groupBy: of GroupingStore, around line 25625 or thereabouts.

It tries to call this.sort with an Array of sorters. The array is empty. But the instance method sort,
clearly takes a fieldName and dir, NOT an array of sorters. This causes problems.



groupBy : function(field, forceRegroup, direction) {
....
....
this.sort(sorters); <--- Array of sorters
fireGroupEvent.call(this);
}
},



sort : function(fieldName, dir) {
if (this.remoteSort) {
return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir); // <-- Problem.
}

var sorters = [];
...


Any fix or suggested workaround for this? I really need grouping to work on my grids with remote sort.

Sesshomurai
31 Oct 2010, 5:39 AM
Ext version tested:

Ext 3.3


Adapter used:

ext


css used:

only default ext-all.css
custom css (include details)




Browser versions tested against:

____
FF3,4
Chrome


Operating System:

________
Fedora 13


Description:

Describe the problem in greater detail here, summarizing the behavior.


Test Case:



<<insert working code to reproduce the report >>


See this URL : http://


Steps to reproduce the problem:

Not sure, its bound to my app but the problem stems from a possible ExtJS coding error.


The result that was expected:

GroupingStore with remotesort to group normally (not remote grouping)


The result that occurs instead:

undefined groupfield name, or exception
Uncaught TypeError: Cannot read property 'field' of undefined




Debugging already done:

See above


Possible fix:

not provided

Sesshomurai
31 Oct 2010, 6:01 AM
It seems this problem is fixed by setting groupOnSort: true.