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>
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>
16 <div class="description">
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>
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">
28 <th class="sig-header" colspan="2">Config Options</th>
29 <th class="msource-header">Defined By</th>
31 <tr class="config-row expandable">
\r
32 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
41 <td class="msource">Field</td>
\r
43 <tr class="config-row alt expandable">
\r
44 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
53 <td class="msource">Field</td>
\r
55 <tr class="config-row expandable">
\r
56 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
65 <td class="msource">Field</td>
\r
67 <tr class="config-row alt expandable">
\r
68 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
77 <td class="msource">Field</td>
\r
79 <tr class="config-row expandable">
\r
80 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
89 <td class="msource">Field</td>
\r
91 <tr class="config-row alt">
\r
92 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
98 <td class="msource">Field</td>
\r
100 <tr class="config-row expandable">
\r
101 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
110 <td class="msource">Field</td>
\r
112 <tr class="config-row alt expandable">
\r
113 <td class="micon"><a class="exi" href="#expand"> </a></td>
\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
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
122 <td class="msource">Field</td>
\r
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>