Print Friendly

Class Ext.data.HttpProxy

Package:Ext.data
Class:HttpProxy
Extends:Object
Defined In:HttpProxy.js
An implementation of Ext.data.DataProxy that reads a data object from an Ext.data.Connection object configured to reference a certain URL.

Note that this class cannot be used to retrieve data from a domain other than the domain from which the running page was served.

For cross-domain access to remote data, use an Ext.data.ScriptTagProxy.

Be aware that to enable the browser to parse an XML document, the server must set the Content-Type header in the HTTP response to "text/xml".


Properties   -  Methods   -  Events

Public Properties

This class has no public properties.

Public Methods

Method Defined By
  HttpProxyObject conn ) HttpProxy
  getConnection() : Connection HttpProxy
Return the Ext.data.Connection object being used by this Proxy.
  loadObject params, Ext.data.DataReader reader, Function callback, Object scope, Object arg ) : void HttpProxy
Load data from the configured Ext.data.Connection, read the data object into a block of Ext.data.Records using the pa...

Public Events

This class has no public events.

Constructor Details

HttpProxy

public function HttpProxy( Object conn )
Parameters:
  • conn : Object
    Connection config options to add to each request (e.g. {url: 'foo.php'} or an Ext.data.Connection object. If a Connection config is passed, the singleton Ext.Ajax object will be used to make the request.

Method Details

getConnection

public function getConnection()
Return the Ext.data.Connection object being used by this Proxy.
Parameters:
  • None.
Returns:
  • Connection
    The Connection object. This object may be used to subscribe to events on a finer-grained basis than the DataProxy events.
This method is defined by HttpProxy.

load

public function load( Object params, Ext.data.DataReader reader, Function callback, Object scope, Object arg )
Load data from the configured Ext.data.Connection, read the data object into a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and process that block using the passed callback.
Parameters:
  • params : Object
    An object containing properties which are to be used as HTTP parameters for the request to the remote server.
  • reader : Ext.data.DataReader
    The Reader object which converts the data object into a block of Ext.data.Records.
  • callback : Function
    The function into which to pass the block of Ext.data.Records. The function must be passed
    • The Record block object
    • The "arg" argument from the load function
    • A boolean success indicator
  • scope : Object
    The scope in which to call the callback
  • arg : Object
    An optional argument which is passed to the callback as its second parameter.
Returns:
  • void
This method is defined by HttpProxy.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.