View Full Version : PagingToolBar and totalCount question

3 Aug 2010, 8:40 PM
My total number of records is not shown in my PagingToolBar, it's still displaying the value of pageSize defined in PagingToolBar. For example, for my example below, the PagingToolBar will display: display 1-3 of 3 (although totalNumber should be 20). Any hint where i did wrong listed below? Where is the value of total record number of PagingToolBar from? Is it from the reader's "tatalProperty: "totalCount""? Thanks a lot.

1. In my frontend grid script file:
var reader = new Ext.data.JsonReader({
idProperty: 'clientId',
root : 'objectsToConvertToRecords'
,totalProperty: 'totalCount'
,remoteSort: true

... new Ext.PagingToolbar({
pageSize: 3
2. On server side, in my DWR read method java file:
int totalCount = 20;
return new JsonReaderResponse(listCombined, totalCount);

And in my DAOHibernate.java:
String queryString = "from clientList where clientId=?";
return session.createQuery(queryString).setLong(0, new Integer(clientId)).setFirstResult(start)


4 Aug 2010, 1:19 AM
And what exactly is returned by the server?

Or are you using a DWRProxy? In that case, what is returned by the client-side DWR method?

4 Aug 2010, 4:07 AM
Hi, Condor: I found the problem, I thought the total was returned as totalCount, but it was actually total after I debugged the response. After I revised it to: totalProperty: 'total', it was good. Thanks a lot for your help.