PDA

View Full Version : Paging Toolbar Refresh Button is not refreshing the store



thangamalar
6 Sep 2010, 5:42 AM
Hi,

My paging toolbar Refresh button is NOT refreshing the store. Please help me. :((


this.bbar = new Ext.PagingToolbar({
pageSize:100
,store:this.store
,displayInfo:true
,plugins: new Ext.ux.ProgressBarPager()
,displayMsg: 'Displaying hypervisors {0} - {1} of {2}'
,emptyMsg: "No hypervisors to display"
});

Condor
6 Sep 2010, 6:00 AM
Are you using a normal store or a PagingStore? For a PagingStore you need to modify the refresh button (see PagingStore thread for details).

I don't know the ProgressBarPager plugin. Could it affect the refresh button?

6 Sep 2010, 7:11 AM
Are you using a normal store or a PagingStore? For a PagingStore you need to modify the refresh button (see PagingStore thread for details).

I don't know the ProgressBarPager plugin. Could it affect the refresh button?


The ProgressBarPager works fine and does not disable the refresh button. Also, there is no PagingStore class, perhaps you meant the PagingMemoryProxy?

Condor
6 Sep 2010, 7:38 AM
PagingStore is one of my user extensions (see the thread why you should use PagingStore instead of PagingMemoryProxy).

thangamalar
6 Sep 2010, 8:16 PM
Condor, I am just using the plain JSON store. ProgressBar has nothing to do with PagingToolbar's Refresh button as it does show the proigress alone when the page is loaded. Refresh button is part of PagingToolbar and the button click doesn't retrieve from the server.

Condor
6 Sep 2010, 9:20 PM
Do you see a sever request being made (Firebug Net tab)?

Did you configure the HttpProxy with method:'GET',disableCaching:false?

thangamalar
6 Sep 2010, 9:49 PM
I had set the store like below.




Ext.ux.grid.Grid = Ext.extend(Ext.grid.GridPanel, {
initComponent:function() {
var config = {
store:new Ext.data.JsonStore({
id:'hypervisors'
,totalProperty:'totalCount'
,root:'hypervisors'
,url:'listHvs.jsp'
,method:'GET'
,disableCaching:false
//,baseParams: {realm: 'All'}
,autoLoad : {params:{start:0, limit:100}}
,fields:[{name : 'HypervisorName', mapping : 'name'},
{name : 'Version', mapping : 'buildVersion'},
{name : 'realm', mapping : 'realm'},
{name : 'status', mapping : 'status.value'},
{name : 'Cores', mapping : 'cores'},
{name : 'CoresAvailable', mapping : 'coresAvail'},
{name : 'Memory', mapping : 'memory'},
{name : 'MemoryAvailable', mapping : 'memoryAvail'},
{name : 'disk', mapping : 'disk'},
{name : 'diskAvailable', mapping : 'diskAvail'},
{name : 'ManagedState', mapping : 'managedState.value'},
{name : 'Model', mapping : 'model'},
{name : 'Location', mapping : 'regionPath'},
{name : 'vmCount', mapping : 'vmCount'}]
})

But it failed to work....the request is NOT going to the server when I press the Refresh button in the paging toolbar.

Condor
6 Sep 2010, 10:49 PM
Are you sure you are using the same store for the grid and the pagingtoolbar?

thangamalar
7 Sep 2010, 2:23 AM
Yes. I am using the same store. If that's not the case, paging won't work. Paging is fine and only the Refresh button is not working out.

Condor
7 Sep 2010, 2:45 AM
If paging works, but refresh not, then I have no idea what is wrong.

Time to start debugging. Put a breakpoint in the PagingToolbar.doRefresh method and step from there.

thangamalar
17 Sep 2010, 2:25 AM
I am not able to get it right till now. Any one has any idea????