July 2015
Beginner
452 pages
8h 34m
English
Before we create the customer module, we are going to reuse the code written in Chapter 7, Give Me the Grid. To be more precise, we are going to use the code made in example 07 and make slight changes. First, for the model, we'll use the following code:
Ext.define(' myApp.model.Customer',{ extend: 'Ext.data.Model', requires: ['myApp.model.Contract'], idProperty: 'id', fields: [ {name: 'id', type: 'int'}, {name: 'name', type: 'string'}, {name: 'phone', type: 'string'}, {name: 'website', type: 'string'}, {name: 'status', type: 'string'}, {name: 'clientSince', type: 'date', dateFormat: 'Y-m-d H:i'}, {name: 'country', type: 'string'}, {name: 'sendnews', type: 'boolean'}, {name: 'employees', type: 'int'}, {name: 'contractInfo', reference: ...
Read now
Unlock full access