webgui/www/extras/extjs/docs/output/Ext.data.Record.html

222 lines
No EOL
11 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ext.data.Record</title>
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
<!-- GC -->
</head>
<body>
<div class="body-wrap">
<div class="top-tools">
<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.data.Record.html" target="_blank">Print Friendly</a><br/>
</div>
<h1>Class Ext.data.Record</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td>Ext.data</td></tr>
<tr><td class="label">Class:</td><td>Record</td></tr>
<tr><td class="label">Extends:</td><td>Object</td></tr>
<tr><td class="label">Defined In:</td><td><a href="Record.jss.html">Record.js</a></td></tr>
</table>
<div class="description">
Instances of this class encapsulate both record <em>definition</em> information, and record
<em>value</em> information for use in <a href="Ext.data.Store.html">Ext.data.Store</a> objects, or any code which needs
to access Records cached in an <a href="Ext.data.Store.html">Ext.data.Store</a> object.
<p>
Constructors for this class are generated by passing an Array of field definition objects to <a href="#create">create</a>
and instances are usually only created by <a href="Ext.data.Reader.html">Ext.data.Reader</a> objects when processing unformatted data
objects.
<p>
Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below. </div>
<br />
<a href="#properties">Properties</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
<hr />
<a name="properties"></a>
<h2>Public Properties</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Property</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#dirty">dirty</a> : Boolean</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr>
<td class="mdesc">Readonly flag - true if this record has been modified.</td>
</tr>
</table>
<a name="methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#Record">Record</a>(<code>data {Array}</code>, <code>id (Optional)</code>)</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr>
<td class="mdesc">This constructor should not be used to create Record objects. Instead, use the constructor generated by
create. The p...</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#commit">commit</a>() : void</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr class="alt">
<td class="mdesc">Usually called by the Ext.data.Store which owns the Record.
Commits all changes made to the Record since either creat...</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#get">get</a>(<code>name {String}</code>) : Object</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr>
<td class="mdesc">Get the value of the named field.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#reject">reject</a>() : void</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr class="alt">
<td class="mdesc">Usually called by the Ext.data.Store which owns the Record.
Rejects all changes made to the Record since either creat...</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#set">set</a>(<code>name {String}</code>, <code>value {Object}</code>) : void</td>
<td class="msource" rowspan="2">Record</td>
</tr>
<tr>
<td class="mdesc">Set the named field to the specified value.</td>
</tr>
</table>
<a name="events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div> <h2 class="mdetail-head">Property Details</h2>
<div class="detail-wrap">
<a name="dirty"></a>
<div class="mdetail">
<h3>dirty</i></h3>
<code>public Boolean dirty</code>
<div class="mdetail-desc">
Readonly flag - true if this record has been modified. </div>
<div class="mdetail-def">This property is defined by Record.</div>
</div>
</div>
<a name="Record"></a>
<h2 class="mdetail-head">Constructor Details</h2>
<div class="detail-wrap">
<div class="mdetail">
<h3>Record</i></h3>
<code>public function Record(<code>data {Array}</code>, <code>id (Optional)</code>)</code>
<div class="mdetail-desc">
This constructor should not be used to create Record objects. Instead, use the constructor generated by
<a href="#create">create</a>. The parameters are the same. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>{Array}</code> : data<div class="sub-desc">An associative Array of data values keyed by the field name.</div></li><li><code>(Optional)</code> : id<div class="sub-desc">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 not specified an integer id is generated.</div></li> </ul>
</div>
</div>
</div>
</div>
<h2 class="mdetail-head">Method Details</h2>
<div class="detail-wrap">
<a name="commit"></a>
<div class="mdetail">
<h3>commit</i></h3>
<code>public function commit()</code>
<div class="mdetail-desc">
Usually called by the <a href="Ext.data.Store.html">Ext.data.Store</a> which owns the Record.
Commits all changes made to the Record since either creation, or the last commit operation.
<p>
Developers should subscribe to the <a href="Ext.data.Store.html#update">Ext.data.Store.update</a> event to have their code notified
of commit operations.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Record.</div>
</div>
<a name="get"></a>
<div class="mdetail alt">
<h3>get</i></h3>
<code>public function get(<code>name {String}</code>)</code>
<div class="mdetail-desc">
Get the value of the named field.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>{String}</code> : name<div class="sub-desc">The name of the field to get the value of.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Object</code><div class="sub-desc">The value of the field.</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Record.</div>
</div>
<a name="reject"></a>
<div class="mdetail">
<h3>reject</i></h3>
<code>public function reject()</code>
<div class="mdetail-desc">
Usually called by the <a href="Ext.data.Store.html">Ext.data.Store</a> which owns the Record.
Rejects all changes made to the Record since either creation, or the last commit operation.
Modified fields are reverted to their original values.
<p>
Developers should subscribe to the <a href="Ext.data.Store.html#update">Ext.data.Store.update</a> event to have their code notified
of reject operations.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Record.</div>
</div>
<a name="set"></a>
<div class="mdetail alt">
<h3>set</i></h3>
<code>public function set(<code>name {String}</code>, <code>value {Object}</code>)</code>
<div class="mdetail-desc">
Set the named field to the specified value.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>{String}</code> : name<div class="sub-desc">The name of the field to set.</div></li><li><code>{Object}</code> : value<div class="sub-desc">The value to set the field to.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Record.</div>
</div>
</div>
</div>
<hr>
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
</body>
</html>