[Reserved] EXT Detailed core API (h) -Ext.dat-Connection/Ajax/Record javascript


Access to the specified url, this is a class of asynchronous call, if want to get server information is specified in the request parameter or the specified listener callback method (for file upload invalid)

Connection (Object config)

Structure, config is defined as {

autoAbort: Boolean,

defaultHeaders: Object,

disableCaching: Boolean,

extraParams: Object,

method: String,

timeout: Number,

url: String



Methods: The methods inherited from the Observable omitted

abort ([Number transactionId]): void

Abandon the request, if there are multiple requests occur simultaneously, the parameter indicates that the request process, serial number, do not specify the last request is to abandon

isLoading ([Number transactionId]): Boolean

The first is finished loading transactionId requests, not approved given that the last

request ([Object options]): Number

Of course, is the most practical method, and returns the previous two methods is needed to process id

Which is defined as {options

url: string, / / request url

params: Object / String / Function, / / method request to post the parameters passed

method: string, / / Get / Post

callback: Function, / / callback method, regardless of success or failure will call this method, there are three parameters, the options parameter passed by the options, success: Boolean, success? response: Object, containing the XMLHttpRequest object to return data

success: Function, / / success callback, the first parameter is XMLHttpRequest object, the second argument to specify the options

failure: Function, / / callback fails, the parameter with the success

scope: Object, / / range

form.: Object / String, / / a form object or its id, which can be automatically generated parameters params

isUpload: Boolean, / / file upload? usually can automatically detect

headers: Object, / / To customize the request headers

xmlData: Object / / a xml document object, it's way through the url additional parameters initiated the request

disableCaching: Boolean / / if disable the cache? default is true



Inherited from the Ext.data.Connection, methods, and parent the same, but simpler to use, is a globally unique static class


Ext.Ajax.request ({

url: 'foo.php',

success: someFn,

failure: otherFn,

headers: {

'My-header': 'foo'


params: {foo: 'bar'}


Ext.Ajax.request ({

form. 'some-form',

params: 'foo = bar'


/ / All requests will Ext.Ajax the first to add a the default

Ext.Ajax.defaultHeaders = {

'Powered-By': 'Ext'


/ / All Ext, Ajax will be called prior to the initiation request showSpinner

Ext.Ajax.on ('beforerequest', this.showSpinner, this);


Basically can be understood as. Net sql server in the datarow or a row of data, which stored the data definition information and their value

[Public property]

data: Object data content, a json object

dirty: Boolean whether the modified

id: Object unique ID, the default from the start with a shaved by 1000

modified: Object if the records are not modified, as null if the original value of the modified information is stored

[Public method]

Record (Array data, [Object id])

This construction method is not used to create the record object, on the contrary, you should use create method to create a record object, the parameter data as defined in the create method, id start the default increment id

beginEdit (): void

Start editing

cancelEdit (): void

Abandon the changes made, see commit

copy ([String id]): Record

/ / Create a clone of the current record value, if the id is not specified, the current id +1

commit ([Boolean silent]): void

commit method will generally be called instead of recorde Store object itself, the author self-created or modified the last time all the changes, if silent is true will not notify the store object

create ([Array o]): function

O is the static constructor config array

Config can contain the following properties which


name: String / / field name

mapping: String / / mapping for the reader when, if it is used for jsonreader, use the javascript expression relative to the current record

/ /, If it is for the xmlreader, it is relative to the record domquery expression, for ArrayReader, is the number

type: String / / optional value auto / string / int / float / boolean / date, which is the default value of auto, do not convert

sortType: Mixed / / sort type, Ext.data.SortTypes one of the members, see sortTypes

sortDir: String / / positive sequence in reverse order ASC / DESC values

convert: Function / / conversion function, this function is useful, customizable, after receiving the current value of the value returned

dateFormat: String / / date format string, convert: function as a special case, the use of Date.parseDate method to convert the current date


endEdit (): void

End modification

get (name {String}): Object

The value of the specified string field named

getChanges (): Object

Return to modify the object record

reject ([Boolean silent]): void

And commit similar, of course, reject the changes made

set (String name, Object value): void

Set new value for the field name value

分类:Web 时间:2010-12-12 人气:161
blog comments powered by Disqus


  • ajax 入门基础之 XMLHttpRequest对象总结 2014-03-19

    在ajax中有一个最为核心的概念就是 XMLHttpRequest 对象,这篇文章将有助于我们更加深入的理解 ajax 的知识 XMLHttpRequest 提供客户端同http服务器通讯的协议 一:创建 IE : http_request = new ActiveXObject("Msxml2.XMLHTTP"); http_request = new ActiveXObject("Microsoft.XMLHTTP"); 非IE: http_request = new XMLHttpRequ

  • XML Document Object Model (DOM) 2010-03-28

    XML Document Object Model (DOM) Be able to programmatically read, process and modify the XML document. XPath expression XPath expressions using the path notation (with the URL path notation used similar) addressing parts of XML documents. Expression ...

  • jquery ajax read xml document 2008-11-15

    xml document: <? xml version = "1.0"?> <msglist> <msg> <ip> </ ip> <time> 2008-08-18 04:37:42 </ time> <content> <! [CDATA [dfasfdsa ]]></ content> </ msg> <msg& ...

  • web.xml in the listener. filter.servlet loading order and Xiang Jie (2) 2010-06-21

    In the project will always encounter some problems on the priority of loading, also recently encountered a similar, and they therefore find the information summarized, the following are reproduced some other people, after all, the good people to write the

  • web.xml in the listener. filter.servlet loading sequence and its Detailed (rpm) 2010-10-27

    I. 1, the start of a project when WEB, WEB container to read its configuration file web.xml, read <listener> and <context-param> two nodes. 2, the emergency was, capacity to create a ServletContext (servlet context), all parts of the web proje

  • web.xml in the listener. filter.servlet loading order and Detailed 2010-11-28

    I. 1, the start of a project when WEB, WEB container to read its configuration file web.xml, read <listener> and <context-param> two nodes. 2, the emergency was, capacity to create a ServletContext (servlet context), all parts of the web proje

  • web.xml in the listener. filter.servlet load order and Detailed 2011-10-09

    <! - Body start -> the web.xml listener, filter, servlet load order and Detailed I. Overview 1, when the project started a WEB, WEB container to read its configuration file web.xml, and read <listener> <context-param> two nodes. 2,

  • Using java.util.properties read / save the resource file and the XML document properties 2010-07-19

    / * Practice using java.util.properties class package to manipulate XML documents propertes and through the store method call can be realized xml / properties files for each save conversion * / import java.util .*; import java.io. *; public class Tes

  • dom4j XML document parsing test 2010-07-31

    1. What is dom4j dom4j is a Java-XML API, similar to the jdom, to read and write XML documents. dom4j is a very very good Java XML API, high-performance, powerful and extremely easy to use features, while it is an open source software, you can find i

  • Read the information from excel and generate XML document structure 2010-10-11

    There is such a demand, a excel file, which describes the structure of a xml document. We need to do a tool, read the excel content and generates the structure of the document. Save the form in which information is the key to this article. For example, ex

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.734 (s). 14 q(s)