打印版式

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 to "text/xml".


属性   -  方法   -  事件

公共属性

此类没有公共属性。

公共方法

方法 定义对象
  HttpProxy(Object conn) HttpProxy
  load(Object 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...

公共事件

此类没有公共事件。

构造函数

HttpProxy

public function HttpProxy(Object conn)
参数:
  • conn : Object
    An Ext.data.Connection object referencing the URL from which the data object is to be read, or a configuration object for an Ext.data.Connection.

方法详情

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.
参数:
  • 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.
返回:
  • void
This method is defined by HttpProxy.

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