Opened 13 years ago
Closed 9 years ago
#10432 closed defect (wontfix)
JsonQuery.js sort part generation
Reported by: | petteri | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Data | Version: | 1.4.0b |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
jsonQuery.js fails to correctly form sort part of query as ternary operation with simplifiedQuery is not enclosed in round brackets.
Expected query:
resourcePath/[/@['sortAttribute']][:25]
Resulting query:
resourcePath/sortAttribute][:25]
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | JsonQuery.js.diff added |
---|
comment:1 Changed 13 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.
Note: See
TracTickets for help on using
tickets.
I also came across this problem. I use a DataGrid? with a JsonQueryRestStore?.
After some troubleshooting, I think I found the cause of the problem.
In the Dojox\Data\Util\JsonQuery?.js on line 55 it says:
_1.queryStr+=(_3?"[":",")+(_d[i].descending?"%5C":"%2F")+_4.simplifiedQuery?encodeURIComponent(_d[i].attribute):("@+dojo._escapeString(_d[i].attribute)+?");
The problem here seems to be that there are brackets missing around the third part of the statement:
_4.simplifiedQuery?encodeURIComponent(_d[i].attribute):("@+dojo._escapeString(_d[i].attribute)+?"
If you add brackets resulting in the following line, it seems to work:
_1.queryStr+=(_3?"[":",")+(_d[i].descending?"%5C":"%2F")+(_4.simplifiedQuery?encodeURIComponent(_d[i].attribute):("@+dojo._escapeString(_d[i].attribute)+?"));