10 Oct 2007 2:20 PM #1
[Ext 2.0] Problem with Converting 1.1 Paginated Grid
I've been plugging away at this now for a couple of days and I can't seem to get any headway on it.
Our group is converting a paginated grid that was working in 1.1 to 2.0. But for some reason our pagination is not working. I'm pretty sure it's something really silly, like I'm missing something in HttpProxy or my DataStore is screwed up somehow.
But I've gone through all the 2.0 samples and threads I can find and have been unable to figure out a solution. Any help would be greatly appreciated.
The developers have checked the backend code and pinged this one back over the fence to me. But I'm at a loss as to why this has stopped working in 2.0.
Any help would be appreciated. Thanks.
10 Oct 2007 2:44 PM #2
I see my first mistake.
Posting this in the Ext 1.x forum. My bad. Could someone please move it over to the Ext 2.x Help forum?
Sorry about the confusion. I didn't see that there were two separate forums.
11 Oct 2007 5:48 AM #3
What I've been able to figure out thus far is that the remote paging does not appear to be sending the 'start' and 'limit' parameters. So every time it goes to the server it's hitting the HttpProxy url ("/agreements.json") but because there are no start/limit params it's not getting anything back.
If I set the parameters to default to "0" and "20" (respectively) on the backend, it comes back with the first page of results always, even though the toolbar shows the correct page number.
Does anyone know if there's an issue with the Paging Toolbar and the HttpProxy in 2.0?
I've gone through all the source code for Ext.PagingToolbar and even for Ext.Toolbar and Ext.Button. My next step is to search through the HttpProxy code to make sure there isn't a parameter I'm missing.
If anyone has any ideas or experience with this, please let me know. Ext 1.1 did not pass my earlier POC but I'm thinking if I can get the 2.0 grid (with features like grouping and the expander row) I'll be able to make a better pitch to my management team.
So any help would be great, especially considering that part of my POC is that Ext would speed up development. I'm willing to try just about anything within my capabilities at the moment to get this POC done.
P.S. Our backend is Ruby on Rails. Not sure if that helps. Maybe the PagingToolbar is posting the params instead of sending them via GET?
11 Oct 2007 6:08 AM #4
take a look at how your calls are being made via firebug:"
11 Oct 2007 6:27 AM #5
That screencast was very helpful. Are there any more of those available?
I went into HttpProxy and looked through all that code. I will say this about ExtJS. I often learn much more from rifling through the code than reading the Documentation. Not sure why that is.
Back to topic...
So, I went to turn on ext-all-debug again so I could fiddle with some code and I noticed that I still had ext-base as my adapter. Previously, we were using the prototype adapter (Rails...). I remember turning that on earlier in the week in a desperate attempt to get the grids to do anything.
Then I went in and threw some console debugs and alerts in different places and I found that the start/limit were being sent as parameters through HttpProxy. And, lo and behold, the grids magically worked again.
I don't know why this is. But I'm guessing the backend developers had some sort of Prototype dependant code on their end.
I know it doesn't make sense but it appears to be working now, which is a big improvement.
Thanks again, DJLI. That's a useful tip with Firebug.
13 Nov 2007 6:54 AM #6
Not sure why, but I had this exact same problem. Paginated grids was working fine with JQuery/adapter but after I switched to ext-base they stopped working. Of course, I didn't realize WHY they stopped working until I read this thread and switched back to JQuery.
13 Nov 2007 8:13 AM #7