PDA

View Full Version : [FIXED] Plugin 6.0.8 selModel/type=spreadsheet requires Ext.grid.selection.SpreadsheetModel



russ396
19 Feb 2016, 11:53 AM
In moving from ExtJS 5.1.0/Cmd 5.1.2.52/MyEclipse2014 to ExtJS 6.0.1/Cmd 6.1.0.65/IntelliJ 15.0.3/JetBrains Plugin 6.0.8. I had a 404 error show up looking for '.js' file with no name and the page would no longer display:

54044

The root cause was that I was missing Ext.grid.selection.SpreadsheetModel. I had it in ExtJS5 version, but JetBrains plugin suggested that I remove it. Attached is the source code and a screenshot of the suggestion:

54046


/**
* This class is the main view for the application. It is specified in app.js as the
* "mainView" property. That setting automatically applies the "viewport"
* plugin causing this view to become the body element (i.e., the viewport).
*
*/
Ext.define('SystemThreads.view.main.Main', {
extend: 'Ext.container.Viewport',
xtype: 'app-main',

requires: [
'Ext.container.Viewport',
'Ext.grid.Panel',
'Ext.panel.Panel',
'Ext.grid.filters.Filters',
'Ext.grid.plugin.Clipboard',
'Ext.grid.selection.SpreadsheetModel',
'Ext.layout.container.Border',
'Ext.toolbar.Fill',
'SystemThreads.store.ThreadStore',
'SystemThreads.view.main.MainController',
'SystemThreads.view.main.MainModel'
],


controller: 'main',
viewModel: {
type: 'main'
},

layout: 'border',

items: [{
xtype: 'panel',
layout: { type: 'border' },
frame: false,
border: false,
loader: {
url: 'http://localhost:81/header.jsp',
autoLoad: true,
params: {
targetPage: 'SYSTEMTHREADS'
}
},
region: 'north',
height: 60
},{
xtype: 'panel',
frame: false,
border: false,
region: 'center',
layout: { type: 'border' },
items: [{
xtype: 'panel',
frame: false,
border: false,
loader: {
url: 'http://localhost:81/secure/system/header.jsp',
autoLoad: true,
params: {
targetPage: 'SYSTEMTHREADS'
}
},
region: 'north',
height: 20
},{
xtype: 'grid',
region: 'center',
store: {
type: 'threads',
listeners: {
load: function(store) {
console.log('loaded');
var c = store.getTotalCount();
Ext.ComponentManager.onAvailable( 'componentTotalCount', function(comp) {
comp.update({'totalcount':c});
},this);
}
}
},
columns: [
{ text: 'ID', dataIndex: 'ID', width: 50, sortable: true, filter: 'number',hideable: false },
{ text: 'Blocked<br/>Count', dataIndex: 'BLOCKEDCOUNT',width: 80, sortable: true, filter: 'number',hideable: false },
{ text: 'Blocked<br/>Time', dataIndex: 'BLOCKEDTIME',width: 80, sortable: true, filter: 'number',hideable: false },
{ text: 'Waited<br/>Count', dataIndex: 'WAITEDCOUNT',width: 80, sortable: true, filter: 'number',hideable: false },
{ text: 'Waited<br/>Time', dataIndex: 'WAITEDTIME',width: 80, sortable: true, filter:'number',hideable: false },
{
text: 'State',
dataIndex: 'STATE',
width: 150,
sortable: true,
filter: {
type: 'list',
options: ['BLOCKED','NEW','RUNNABLE','TERMINATED','TIMED_WAITING','WAITING']
},
hideable: false },
{
text: 'Name',
dataIndex: 'NAME',
sortable: true,
filter: 'string',
width: 1200,
hideable: false}
],
autoLoad: true,
remoteSort: false,
remoteFilter: false,
columnLines: true,
loadMask: true,
plugins: [
'gridfilters',
'clipboard'
],
selModel: {
type: 'spreadsheet',
ignoreRightMouseSelection: true,
rowSelect: false
},
tbar: [{
text: 'Reload',
iconCls: 'refresh',
handler: 'onReload'
}, {
text: 'Help',
iconCls: 'info',
handler: 'onHelp'
}, '->' , {
xtype: 'component',
tpl: 'Total Threads: {totalcount}',
style: 'margin-right:5px',
id: 'componentTotalCount',
data: {
totalcount: 0
}
}]

}]
}]
});



Please add feature to look for selModel/type=spreadsheet require Ext.grid.selection.SpreadsheetModel.

Thanks,
Russ

Mark.Brocato
24 Feb 2016, 9:07 PM
Thanks for the report! I have opened a bug in our bug tracker.