X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/source/Record.html diff --git a/docs/source/Record.html b/docs/source/Record.html index cb6d31f4..d3be8e6b 100644 --- a/docs/source/Record.html +++ b/docs/source/Record.html @@ -1,11 +1,18 @@ - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.data.Record *

Instances of this class encapsulate both Record definition information, and Record * value information for use in {@link Ext.data.Store} objects, or any code which needs @@ -22,15 +29,17 @@ * {@link #data} and {@link #id} properties.

*

Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.

* @constructor - * This constructor should not be used to create Record objects. Instead, use {@link #create} to - * generate a subclass of Ext.data.Record configured with information about its constituent fields. + *

This constructor should not be used to create Record objects. Instead, use {@link #create} to + * generate a subclass of Ext.data.Record configured with information about its constituent fields.

+ *

The generated constructor has the same signature as this constructor.

* @param {Object} data (Optional) An object, the properties of which provide values for the new Record's * fields. If not specified the {@link Ext.data.Field#defaultValue defaultValue} * for each field will be assigned. - * @param {Object} id (Optional) The id of the Record. This id should be unique, and is used by the - * {@link Ext.data.Store} object which owns the Record to index its collection of Records. If - * an id is not specified a {@link #phantom} Record will be created - * with an {@link #Record.id automatically generated id}. + * @param {Object} id (Optional) The id of the Record. The id is used by the + * {@link Ext.data.Store} object which owns the Record to index its collection + * of Records (therefore this id should be unique within each store). If an + * id is not specified a {@link #phantom} + * Record will be created with an {@link #Record.id automatically generated id}. */ Ext.data.Record = function(data, id){ // if no id, call the auto id method @@ -73,8 +82,8 @@ var myNewRecord = new TopicRecord( myStore.{@link Ext.data.Store#add add}(myNewRecord);
* @method create - * @return {function} A constructor which is used to create new Records according - * to the definition. The constructor has the same signature as {@link #Ext.data.Record}. + * @return {Function} A constructor which is used to create new Records according + * to the definition. The constructor has the same signature as {@link #Record}. * @static */ Ext.data.Record.create = function(o){ @@ -136,6 +145,18 @@ Ext.data.Record.prototype = { * @property id * @type {Object} */ +
/** + *

Only present if this Record was created by an {@link Ext.data.XmlReader XmlReader}.

+ *

The XML element which was the source of the data for this Record.

+ * @property node + * @type {XMLElement} + */ +
/** + *

Only present if this Record was created by an {@link Ext.data.ArrayReader ArrayReader} or a {@link Ext.data.JsonReader JsonReader}.

+ *

The Array or object which was the source of the data for this Record.

+ * @property json + * @type {Array|Object} + */
/** * Readonly flag - true if this Record has been modified. * @type Boolean @@ -151,7 +172,7 @@ Ext.data.Record.prototype = { */ modified : null,
/** - * false when the record does not yet exist in a server-side database (see + * true when the record does not yet exist in a server-side database (see * {@link #markDirty}). Any record which has a real database pk set as its id property * is NOT a phantom -- it's real. * @property phantom @@ -189,7 +210,7 @@ rec.{@link #commit}(); // update the record in the store, bypass setting dirty flag, // and do not store the change in the {@link Ext.data.Store#getModifiedRecords modified records} -rec.{@link #data}['firstname'] = 'Wilma'); // updates record, but not the view +rec.{@link #data}['firstname'] = 'Wilma'; // updates record, but not the view rec.{@link #commit}(); // updates the view *
* Notes: