Opened 14 years ago

Closed 14 years ago

#5270 closed defect (fixed)

Handle numRows sent by the server

Reported by: wolfram Owned by: Jared Jurkiewicz
Priority: high Milestone:
Component: DojoX Data Version: 1.0
Keywords: Cc:
Blocked By: Blocking:


for making paging easier using the queryreadstore numRows can now be sent by the server, which the QueryReadStore? will store and provide as a property.

Attachments (2)

patch5270.diff (1.2 KB) - added by wolfram 14 years ago. (5.7 KB) - added by Jared Jurkiewicz 14 years ago.
Updtaed patch for handling numRows…

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by wolfram

Attachment: patch5270.diff added

comment:1 Changed 14 years ago by Jared Jurkiewicz

I don't think this patch really helps solve the issue noted and it introduces another bug. Namely, it will fail if you have two different widgets doing queries against the same store. Different queries will have different # of rows returns. so, this introduces a timing window problem. Will propose an alternate patch which I think would be better.

comment:2 Changed 14 years ago by Jared Jurkiewicz

In reality, this should be passing back the data of #numRows as the parameter to the onBegin callback, which is explicitly defined as the size of match set, not just the current page size.

Changed 14 years ago by Jared Jurkiewicz

Updtaed patch for handling numRows...

comment:3 Changed 14 years ago by Jared Jurkiewicz


I've attached an updated patch which handles returning total # of rows in the manner defined by the APIs (through the onBegin function), plus unit tests for it. Please take a look and tell me if you are also happy with this patch (as it's your store, effectively).

I've tested it on IE 6, Firefox, and Safari B3.

If you're satisfied with this, I'll commit it.

comment:4 Changed 14 years ago by wolfram

Jaredj, this looks perfect and it definitely makes more sense then my suggestion, thank you! go ahead and commit it please! I am just a bit short in time lately, gotta finish a project until the end of the year :-(

comment:5 Changed 14 years ago by Jared Jurkiewicz

That's fine. I just wanted to clear it by you, since you are the primary author of it. I'll commit it in a few minutes. Thanks for all your work on this store, by the way. It is very appreciated.

comment:6 Changed 14 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [11711]) Minor update for QueryReadStore?. fixes #5270

Note: See TracTickets for help on using tickets.