Defining our stores
The TaskLogList
and TaskLogForm
views require stores to function. The TaskLogList
view requires a TaskLog
store, while the TaskLogForm
view requires a Project
and a Task
store. Let's define them now.
The TaskLog store
We define this store with a helper method to allow easy loading for the task log searches. The definition is as follows:
Ext.define('TTT.store.TaskLog', { extend: 'Ext.data.Store', requires: ['TTT.model.TaskLog'], model: 'TTT.model.TaskLog', proxy: { type: 'ajax', url: 'taskLog/findByUser.json', reader: { type: 'json', root: 'data' } }, doFindByUser: function(username, startDate, endDate) { this.load({ params: { username: username, startDate: Ext.Date.format(startDate, 'Ymd'), endDate: Ext.Date.format(endDate, 'Ymd') ...
Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.