Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails ExtJS pagination
    primarykey
    data
    text
    <p>I am using ExtJS 3.3.1 with Grails 2.0 to do pagination on screen, but it does not work as I expect. I followed the tip posted here: <a href="https://stackoverflow.com/questions/4548892/grails-extjs-grid-paging">Grails extJS grid paging</a><br> JS page </p> <pre><code>paramNames: {start:'offset',limit:'max',sort:'sort',dir:'order'}, baseParams: {offset:0,max:10}, </code></pre> <p>The pagingToolbar: </p> <pre><code>this.gridBBar = new Ext.PagingToolbar({ pageSize : 10, store : this.gridStore, displayInfo : true, displayMsg : 'Hiển thị {0} - {1} mục tìm được của {2} kết quả', emptyMsg : 'Không tìm thấy dữ liệu', }); </code></pre> <p>Controller: </p> <pre><code>def result = Floor.createCriteria().list( max:params.int('max')?:100, offset:params.int('offset')?:0 ) render ([count:result.totalCount,data:result] as JSON) </code></pre> <p>but the paging button (Next) was disabled because the store just contained only 10 item, no more to retrieve.<br> When I change the offset to 10: </p> <pre><code>paramNames: {start:'offset',limit:'max',sort:'sort',dir:'order'}, baseParams: {offset:10,max:10}, </code></pre> <p>the pagination is work well, except one strange thing: the grid always display the next 10 results (10th-20th record for 1st click, 20th-30th record for 2nd), not the current first 10 results. I don't know what the correct usage of pagination combined from ExtJs and Grails is. If you have experience in this problem, could you please share me some information?<br> Thank you so much.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload