27 Jun 2010 5:31 PM #1
Grid + Search Plugin + Pagination + Servlet
I am a bit of a newbie with this ExtJS thing. I have been developing in Java for a couple of months and after trying several frameworks I ended up choosing ExtJS because it had everything I wanted without the dependence of many plugins.
I am currently using a grid with remote pagination and everything works fine. I created a servlet that creates the sql dinamically based on the paremeters sent by the grid.
The problem comes when I try to implement the Search Plugin. I made it work in remote mode, but I get the count for the pagination with a simple "select count(*) from account" to make the query fast.
However, when I search for something, no matter the results it brings me several pages (The toolbar says for example page 1 of 3 even there is only one record return by the search) since its reading the count from the complete table and not the results from the search query.
I know I can basically solve this by running another query but without the "limit 0,20" parameters but it seems that I will be killing performance making two requests.
What should be the proper way of solving this?
On another note, I see that it search as long as I type something. I would like to make it search when I press enter but if you need to modify a lot of things, I leave it as it is.
Thank you all!!
By jsakalos in forum Ext:User Extensions and PluginsReplies: 1036Last Post: 3 Apr 2015, 3:18 AM
By mehmetcan in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 15 Jan 2010, 7:15 AM
By gsfipa in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 20 Sep 2009, 11:20 AM
By snehat in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 24 Jul 2008, 2:47 AM