- // configure how to read the XML Data
- reader : new Ext.data.XmlReader({
- record : 'contact',
- success: '@success'
- }, [
- {name: 'first', mapping:'name/first'}, // custom mapping
- {name: 'last', mapping:'name/last'},
- 'company', 'email', 'state',
- {name: 'dob', type:'date', dateFormat:'m/d/Y'} // custom data types
- ]),
-
- // reusable eror reader class defined at the end of this file
- errorReader: new Ext.form.XmlErrorReader(),
-
- items: [
- new Ext.form.FieldSet({
- title: 'Contact Information',
- autoHeight: true,
- defaultType: 'textfield',
- items: [{
- fieldLabel: 'First Name',
- name: 'first',
- width:190
- }, {
- fieldLabel: 'Last Name',
- name: 'last',
- width:190
- }, {
- fieldLabel: 'Company',
- name: 'company',
- width:190
- }, {
- fieldLabel: 'Email',
- name: 'email',
- vtype:'email',
- width:190
- },
-
- new Ext.form.ComboBox({
- fieldLabel: 'State',
- hiddenName:'state',
- store: new Ext.data.ArrayStore({
- fields: ['abbr', 'state'],
- data : Ext.exampledata.states // from states.js
- }),
- valueField:'abbr',
- displayField:'state',
- typeAhead: true,
- mode: 'local',
- triggerAction: 'all',
- emptyText:'Select a state...',
- selectOnFocus:true,
- width:190
- }),