Results 1 to 7 of 7

Thread: Errors when adding edit and before Edit to cellEditPlugin

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Connecticut
    Posts
    1,016

    Default Errors when adding edit and before Edit to cellEditPlugin

    I have a grid which has the cell edit plugin. I added a before edit and an edit event and I get the following:

    Unable to dynamically resolve method "onCellEditingEdit" on Ext.grid.plugin.CellEditing


    I have read in the forum about changing the scope of the listener to the "controller" but I am not sure how once can do that in SA?

    Bruce

  2. #2

    Default

    Can you link to that forum post that talks about forcing the "controller" scope? Is this a framework bug? Something that we need to work around in Architect perhaps?

    In terms of forcing scope:"controller", you can force that by setting defaultListenerScope:true on the view class; that will trigger Architect to automatically add scope:"controller" to any view controller event bindings to counteract the default scope.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha Premium User
    Join Date
    Dec 2010
    Posts
    279

    Default

    I am getting the same error. I have a grid with the cell editing plugin.

    Code:
        plugins: [
            {
                ptype: 'cellediting',
                listeners: {
                    edit: {
                        fn: 'onCellEditingEdit',
                        scope: 'controller'
                    }
                }
            }
        ],
    In the view controller:
    Code:
        onCellEditingEdit: function(editor, context, eOpts) {
    
        }
    when a cell is edited I get the error:

    [E] Ext.util.Event.getFireInfo(): Unable to dynamically resolve method "onCellEditingEdit"
    https://dev.mysite.com/js/ext/ext-all-debug.js
    Line 6152

    is there any way to make this work??

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Just gave this a quick test in build #1934.

    I opened the car listings example, added a cell editing plugin, added a controller event handler for 'edit'.
    I then added an 'editor' for the manufacturer column.
    I put in an alert in the onCellEditingEdit function and it popped up

    I did not set an additional scope.

    snippets of relevant code generated

    In the view:
    Code:
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'manufacturer',
                                text: 'Manufacturer',
                                editor: {
                                    xtype: 'textfield'
                                }
                            },
    // ....
                        plugins: [
                            {
                                ptype: 'cellediting',
                                listeners: {
                                    edit: 'onCellEditingEdit'
                                }
                            }
                        ]
                    }
    //    ...
    In the controller:
    Code:
    Ext.define('CarListings.view.MainViewController', {
        extend: 'Ext.app.ViewController',
        alias: 'controller.main',
    //...
        onCellEditingEdit: function(editor, context, eOpts) {
            alert('editing');
        }
    
    });
    Aaron Conran
    @aconran

  5. #5
    Sencha Premium User
    Join Date
    Dec 2010
    Posts
    279

    Default

    I am still not able to get this to work properly. This is happening with every grid I have created. In your test where you using Ext JS 5.01? The version I am using is 5.0.1.1255 The only way I can get my grids to work is put the cell editing method in the view and not the view controller.

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    tomdchi -
    Could you archive up a simple example and send it over to us to take a look at? You can send it to architect.feedback at sencha.com
    Aaron Conran
    @aconran

  7. #7
    Sencha Premium User
    Join Date
    Dec 2010
    Posts
    279

    Default

    Whatever was causing this issue seems to have been fixed in version 5.1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •