commit extjs-2.2.1
[extjs.git] / docs / output / Ext.data.Field.html
1         <div class="body-wrap">
2         <div class="top-tools">
3             <a class="inner-link" href="#Ext.data.Field-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4             <a class="inner-link" href="#Ext.data.Field-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5             <a class="inner-link" href="#Ext.data.Field-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                             <a class="inner-link" href="#Ext.data.Field-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7                         <a class="bookmark" href="../docs/?class=Ext.data.Field"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8         </div>
9                 <h1>Class Ext.data.Field</h1>
10         <table cellspacing="0">
11             <tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr>
12             <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/DataField.js" target="_blank">DataField.js</a></td></tr>
13             <tr><td class="label">Class:</td><td class="hd-info">Field</td></tr>
14                                     <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
15                     </table>
16         <div class="description">
17             *
18 <p>This class encpasulates the field definition information specified in the field definition objects
19 passed to <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>.</p>
20 <p>Developers do not need to instantiate this class. Instances are created by <a ext:cls="Ext.data.Record.create" href="output/Ext.data.Record.create.html">Ext.data.Record.create</a>
21 and cached in the <a ext:cls="Ext.data.Record" ext:member="fields" href="output/Ext.data.Record.html#fields">fields</a> property of the created Record constructor's <b>prototype.</b></p>        </div>
22         
23         <div class="hr"></div>
24                 <a id="Ext.data.Field-configs"></a>
25         <h2>Config Options</h2>
26         <table cellspacing="0" class="member-table">
27             <tr>
28                 <th class="sig-header" colspan="2">Config Options</th>
29                 <th class="msource-header">Defined By</th>
30             </tr>
31                 <tr class="config-row expandable">\r
32         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
33         <td class="sig">\r
34         <a id="Ext.data.Field-convert"></a>\r
35             <b>convert</b> : Function            <div class="mdesc">\r
36                         <div class="short">(Optional) A function which converts the value provided by the Reader into an object that will be stored in the Recor...</div>\r
37             <div class="long">\r
38                 (Optional) A function which converts the value provided by the Reader into an object that will be stored in the Record. It is passed the following parameters:<ul> <li><b>v</b> : Mixed<div class="sub-desc">The data value as read by the Reader.</div></li> <li><b>rec</b> : Mixed<div class="sub-desc">The data object containing the row as read by the Reader. Depending on Reader type, this could be an Array, an object, or an XML element.</div></li> </ul>            </div>\r
39                         </div>\r
40         </td>\r
41         <td class="msource">Field</td>\r
42     </tr>\r
43         <tr class="config-row alt expandable">\r
44         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
45         <td class="sig">\r
46         <a id="Ext.data.Field-dateFormat"></a>\r
47             <b>dateFormat</b> : String            <div class="mdesc">\r
48                         <div class="short">(Optional) A format string for the Date.parseDate function, or "timestamp" if the value provided by the Reader is a U...</div>\r
49             <div class="long">\r
50                 (Optional) A format string for the <a ext:cls="Date" ext:member="parseDate" href="output/Date.html#parseDate">Date.parseDate</a> function, or "timestamp" if the value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a javascript millisecond timestamp.            </div>\r
51                         </div>\r
52         </td>\r
53         <td class="msource">Field</td>\r
54     </tr>\r
55         <tr class="config-row expandable">\r
56         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
57         <td class="sig">\r
58         <a id="Ext.data.Field-defaultValue"></a>\r
59             <b>defaultValue</b> : Mixed            <div class="mdesc">\r
60                         <div class="short">(Optional) The default value used when a Record is being created by a Reader when the item referenced by the mapping ...</div>\r
61             <div class="long">\r
62                 (Optional) The default value used <b>when a Record is being created by a <a ext:cls="Ext.data.Reader" href="output/Ext.data.Reader.html">Reader</a></b> when the item referenced by the <b><tt>mapping</tt></b> does not exist in the data object (i.e. undefined). (defaults to "")            </div>\r
63                         </div>\r
64         </td>\r
65         <td class="msource">Field</td>\r
66     </tr>\r
67         <tr class="config-row alt expandable">\r
68         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
69         <td class="sig">\r
70         <a id="Ext.data.Field-mapping"></a>\r
71             <b>mapping</b> : String            <div class="mdesc">\r
72                         <div class="short">(Optional) A path specification for use by the Ext.data.Reader implementation that is creating the Record to access t...</div>\r
73             <div class="long">\r
74                 (Optional) A path specification for use by the <a ext:cls="Ext.data.Reader" href="output/Ext.data.Reader.html">Ext.data.Reader</a> implementation that is creating the Record to access the data value from the data object. If an <a ext:cls="Ext.data.JsonReader" href="output/Ext.data.JsonReader.html">Ext.data.JsonReader</a> is being used, then this is a string containing the javascript expression to reference the data relative to the Record item's root. If an <a ext:cls="Ext.data.XmlReader" href="output/Ext.data.XmlReader.html">Ext.data.XmlReader</a> is being used, this is an <a ext:cls="Ext.DomQuery" href="output/Ext.DomQuery.html">Ext.DomQuery</a> path to the data item relative to the Record element. If the mapping expression is the same as the field name, this may be omitted.            </div>\r
75                         </div>\r
76         </td>\r
77         <td class="msource">Field</td>\r
78     </tr>\r
79         <tr class="config-row expandable">\r
80         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
81         <td class="sig">\r
82         <a id="Ext.data.Field-name"></a>\r
83             <b>name</b> : String            <div class="mdesc">\r
84                         <div class="short">The name by which the field is referenced within the Record. This is referenced by, for example, the dataIndex proper...</div>\r
85             <div class="long">\r
86                 The name by which the field is referenced within the Record. This is referenced by, for example, the <em>dataIndex</em> property in column definition objects passed to <a ext:cls="Ext.grid.ColumnModel" href="output/Ext.grid.ColumnModel.html">Ext.grid.ColumnModel</a>            </div>\r
87                         </div>\r
88         </td>\r
89         <td class="msource">Field</td>\r
90     </tr>\r
91         <tr class="config-row alt">\r
92         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
93         <td class="sig">\r
94         <a id="Ext.data.Field-sortDir"></a>\r
95             <b>sortDir</b> : String            <div class="mdesc">\r
96                             (Optional) Initial direction to sort. "ASC" or "DESC"                        </div>\r
97         </td>\r
98         <td class="msource">Field</td>\r
99     </tr>\r
100         <tr class="config-row expandable">\r
101         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
102         <td class="sig">\r
103         <a id="Ext.data.Field-sortType"></a>\r
104             <b>sortType</b> : Function            <div class="mdesc">\r
105                         <div class="short">(Optional) A function which converts a Field's value to a comparable value in order to ensure correct sort ordering. ...</div>\r
106             <div class="long">\r
107                 (Optional) A function which converts a Field's value to a comparable value in order to ensure correct sort ordering. Predefined functions are provided in <a ext:cls="Ext.data.SortTypes" href="output/Ext.data.SortTypes.html">Ext.data.SortTypes</a>            </div>\r
108                         </div>\r
109         </td>\r
110         <td class="msource">Field</td>\r
111     </tr>\r
112         <tr class="config-row alt expandable">\r
113         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
114         <td class="sig">\r
115         <a id="Ext.data.Field-type"></a>\r
116             <b>type</b> : String            <div class="mdesc">\r
117                         <div class="short">(Optional) The data type for conversion to displayable value. Possible values are auto (Default, implies no conversio...</div>\r
118             <div class="long">\r
119                 (Optional) The data type for conversion to displayable value. Possible values are <ul><li>auto (Default, implies no conversion)</li> <li>string</li> <li>int</li> <li>float</li> <li>boolean</li> <li>date</li></ul>            </div>\r
120                         </div>\r
121         </td>\r
122         <td class="msource">Field</td>\r
123     </tr>\r
124             </table>
125                 <a id="Ext.data.Field-props"></a>
126         <h2>Public Properties</h2>
127         <div class="no-members">This class has no public properties.</div>        <a id="Ext.data.Field-methods"></a>
128         <h2>Public Methods</h2>
129         <div class="no-members">This class has no public methods.</div>        <a id="Ext.data.Field-events"></a>
130         <h2>Public Events</h2>
131         <div class="no-members">This class has no public events.</div>
132         </div>