I am about as confused as I've been working with extjs. I've used this in dozens and dozens of apps with no issue. In this one, it keeps throwing error that getEditor is not a function. You normally get that when you forget to add the plugin, not the case here. I've compared code to apps where it works fine, it's identical. You guys see anything here?
Capture.PNG
Code:
Ext.define('PRE.view.ResultsNotesGrid',{ extend : 'Ext.grid.Panel', alias : 'widget.resultsnotesgrid', loadMask: false, preventHeader: true, bodyBorder: false, frame: true, PNPRE: ' ', viewConfig: { forceFit: true, emptyTextPlugin: false, enableRowBody: true, emptyText: '<center>There are no result notes.</center>' }, selType: 'rowmodel', plugins: [ Ext.create('Ext.grid.plugin.RowEditing', { clicksToEdit: 2 }) ], initComponent : function(){ //this.contextMenu = this.buildContextMenu(); this.store = Ext.getStore('resultnotes'); this.dockedItems = this.buildDockedItems(); this.columns = this.buildColumns(); this.callParent(arguments); var tg = this; this.getStore().on({ scope: this, beforeload: function(st) { st.getProxy().extraParams = { pgm: 'VALV189', action: 'getResultNotes', pre : this.PNPRE }; } }); this.on({ scope: this, edit: function(editor, e) { this.updateNote(e.record); } }); }, updateNote : function(record) { var parms = { pgm: 'VALV189', action: 'updNote', pre: this.PNPRE, seq: record.get('PNSEQ'), type: record.get('PNTYPE'), text: record.get('PNTEXT') }; Ext.Ajax.request({ url: '/valence/vvcall.pgm', params: parms, scope: this, success: function(response) { var check = response.responseText; if (check) { var data = Ext.decode(response.responseText); if (data.SUCCESS === '1') { record.commit(); //this.down('itemnotesgrid').getStore().load(); } else { Ext.Msg.alert('ERROR-', data.MSG); } } else { Ext.Msg.alert('ERROR OCCURED', 'Received a null response from the server when attempting to update a record.'); } }, failure: function() { Ext.Msg.alert('ERROR OCCURED', 'Received a failure response from the server when attempting to update a record.'); } }); }, buildDockedItems : function(){ return [{ xtype : 'toolbar', dock : 'top', itemId : 'tbar', defaults: { xtype: 'button' }, items : [{ itemId: 'btnAddResNote', xtype: 'button', text: 'New Result Note', tooltip: 'add a new result note', iconCls: 'add', scope: this, handler: this.addResultNote }] }]; }, addResultNote: function() { //console.log(this); var type = 'R'; this.fireEvent('addresnote',type); }, buildColumns : function(){ return [{ header: 'Delete', xtype: 'actioncolumn', align: 'center', width: 50, sortable: false, items: [{ icon: 'http://10.29.231.57:7040/resources/icons/silk/delete.gif', itemId: 'actionresnotedel', scope: this, handler: function(grid, rowIndex) { var rec = grid.getStore().getAt(rowIndex); //console.log('handler fired', rec.get('INITEM')); this.fireEvent('delClick', rec); } }] },{ dataIndex: 'PNPRE', hidden: true }, { header: '<b>Seq No</b>', width: 80, sortable: false, dataIndex: 'PNSEQ', renderer: function(val, x, store){ return '<div class="vv-griddescription">' + val + '</div>'; } }, { header: '<b>Note Text</b>', width: 350, sortable: false, dataIndex: 'PNTEXT', editor: { xtype: 'textarea', allowBlank: false, grow: true, maxLength : 3000, selectOnFocus: true }, renderer: function(val, x, store){ return '<div class="vv-griddescription">' + val + '</div>'; } }, { header: '<b>Created</b>', width: 80, sortable: false, dataIndex: 'PNCRTDT', renderer: function(val, x, store){ return '<div class="vv-griddescription">' + val + '</div>'; } }, { header: '<b>By</b>', width: 60, sortable: false, dataIndex: 'PNCRTUSR', renderer: function(val, x, store){ return '<div class="vv-griddescription">' + val + '</div>'; } }]; } });
Capture.PNG
Comment