December 2013
Beginner to intermediate
446 pages
9h 9m
English
Our Project, Task, and TaskLog models were created with basic fields using Sencha Cmd in Chapter 9, Getting Started with Ext JS 4, but they lacked in persistence or validation logic. It is now time to add the required code.
The TaskLog model is the most complicated model in our application. The complete TaskLog model with all required logic is as follows:
Ext.define('TTT.model.TaskLog', {
extend: 'Ext.data.Model',
fields: [
{ name: 'idTaskLog', type: 'int', useNull:true },
{ name: 'taskDescription', type: 'string' },
{ name: 'taskLogDate', type: 'date', dateFormat:'Ymd' }, { name: 'taskMinutes', type: 'int' }, { name: 'hours', type: 'float', persist:false, convert:function(value, record){ return record.get('taskMinutes') ...Read now
Unlock full access