Clear Up
SharpKit Reference

PollingProvider Class

Provides for repetitive polling of the server at distinct intervals. The initial request for data originates from the client, and then is responded to by the server.

All configurations for the PollingProvider should be generated by the server-side API portion of the Ext.Direct stack.

An instance of PollingProvider may be created directly via the new keyword or by simply specifying type = 'polling'. For example:

  
var pollA = new Ext.direct.PollingProvider({
            type:'polling',
            url: 'php/pollA.php',
            });
            Ext.direct.Manager.addProvider(pollA);
            pollA.disconnect();
            Ext.direct.Manager.addProvider(
            {
            type:'polling',
            url: 'php/pollB.php',
            id: 'pollB-provider'
            }
            );
            var pollB = Ext.direct.Manager.getProvider('pollB-provider');
            

Namespace: Ext.direct

Base Interfaces

Fields

Name Description
baseParams An object containing properties which are to be sent as parameters on every polling request
interval How often to poll the server-side in milliseconds. Defaults to every 3 seconds. Defaults to: 3000
url The url which the PollingProvider should contact with each request. This can also be an imported Ext.Direct method which will accept the baseParams as its only argument.
© Copyright 2005-2011 SharpKit. All rights reserved.