I am currently working on building a basic SCRUM system to familiarize myself with EXT 4. While I have some prior experience with MVC3, I am finding it challenging to adapt to the EXT4 framework.
My plan involves setting up 4 grids in a column layout Viewport, where each grid represents its own View. However, these Views are very similar with only minor differences. Below is the code for my initial View, with placeholders indicating the lines that need to be adjusted for the other three views.
Ext.define('AM.view.card.BacklogList', { // *** Variable
extend: 'Ext.grid.Panel',
alias: 'widget.backlogcardlist', // *** Variable
title: 'Backlog', // *** Variable
store: 'BacklogCards', // *** Variable
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
columns: [
// Columns details here...
]
});
Is there a way in EXTjs to pass a 'ViewModel' or parameters to my View so that I can reuse it for all four of my grids?
app.js
Ext.application({
name: 'AM',
appFolder: 'app',
controllers: ['BacklogCards', 'InprogressCards', 'ReviewCards', 'DoneCards'],
launch: function () {
Ext.create('Ext.container.Viewport', {
layout: 'column',
items: [
{
xtype: 'backlogcardlist'
},
{
xtype: 'inprogresslist'
},
{
xtype: 'reviewlist'
},
{
xtype: 'donelist'
}
]
});
}
});