Results 1 to 7 of 7

Thread: Issue saving a model instance with grid RowEditing plugin

  1. #1
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default Answered: Issue saving a model instance with grid RowEditing plugin

    ExtJS 6.0.2

    I have three (3) grids in three (3) different tab panels: migrations, networks, and servers. From the migrations panel, i have a button which launches a "wizard" or series of cards w/ forms. The series of cards provide a form for entering data into ea. of the grids, so:
    • migration form
    • networks upload form
    • legacy server form
    • new server form
    I have enabled the RowEditing plugin on all three grids. When i F5/Refresh the browser, start from the Migrations panel and launch the wizard, i have no problem advancing from card to card, saving information into the various stores bound to each grid.

    The problem is when i F5/refresh the browser, click on the Networks tab to view the networks, then click on the Migrations panel, and then run the wizard, it fails on the first card when attempting to save the Migration instance. It fails on the following source code:

    Code:
        renderColumnData: function(field, record, activeColumn) {
            var me = this,
                grid = me.editingPlugin.grid,
                headerCt = grid.headerCt,
                view = me.scrollingView,
                store = view.dataSource,
    Uncaught TypeError: Cannot read property 'dataSource' of undefined ext-all-rtl-debug.js?_20160630061019:194482

    When i trap on this, it appears that the previous grid's editing plugin is passed... so the grid value is set to the previous grid panel, i.e. Networks. I'm not sure how to fix this. Any thoughts? Do i have to assign pluginIds to each grid's RowEditing configuration? When i launch the "wizard", is there something I need to do to to set from which grid panel i'm launching from? At a loss.

    Each grid panel is its own view package, consisting of view, view model, and view controller. This includes the wizard modal window, which uses a series of cards and forms. I can provide any of the code, i'm just not sure where to start and/or what to show/display in this post that is most relevant.

    One alternative is to remove grid RowEditing entirely and simply go back to using select row with pop-up form in a modal window, but i would much rather get this figured out and working. Any help would be appreciated.

  2. Oye vey... stupid me. I was using index-based approach to getting a form instance. Bad idea. As soon as I lit the grid rowEditing plugin, it basically slides the grid's row editing form to index 0. Just stupid... silly. problem solved.

  3. #2
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default

    One important point. I recall having this problem originally even from an F5/Refresh and launching the wizard immediately from the Migrations panel. I disabled RowEditor plugin on the Migrations Grid panel. If i re-enable it, then it never works. So, it appears that it's a problem with how this "Wizard" is independent from all three Grid Panels. Thanks.

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    So the whole thing works if you disable the RowEditing plugin? Your grids aren't part of the card-based wizard, right?

  5. #4
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    So the whole thing works if you disable the RowEditing plugin? Your grids aren't part of the card-based wizard, right?
    Not quite.
    With the following:
    • Migrations Grid - RowEditing (disabled and removed)
    • Networks Grid - RowEditing enabled
    • Servers Grid - RowEditing enabled
    I have the issue when i perform the following:
    1. refresh browser
    2. select Networks Grid panel to view
    3. select Migrations Grid panel (where the Wizard button is located) to view
    4. click button (launches the "wizard" series of card panels)
    5. try to save Migration from the first card panel - FAILS w/ the above information
    To answer your second Q: no the wizard series of card panels are there own view package. From within the controller though, i'm making calls to save Migration Model, etc...

  6. #5
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default

    Still very stuck on this issue. Could it be a bug? Just not sure. Please see picture of Chrome debugging.

    2016-07-27_10-45-22.jpg

    Any help with this would be MUCH appreciated. Thanks.

  7. #6
    Sencha Premium User
    Join Date
    Feb 2015
    Posts
    25
    Answers
    2

    Default

    Oye vey... stupid me. I was using index-based approach to getting a form instance. Bad idea. As soon as I lit the grid rowEditing plugin, it basically slides the grid's row editing form to index 0. Just stupid... silly. problem solved.

  8. #7
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Great to hear that you worked it out, and thanks for sharing your solution with the rest of us.

Similar Threads

  1. Replies: 8
    Last Post: 25 Apr 2017, 2:21 AM
  2. Replies: 10
    Last Post: 27 Aug 2014, 2:29 PM
  3. Replies: 9
    Last Post: 30 Nov 2011, 5:10 AM
  4. Ext.grid.plugin.RowEditing
    By Fanny144 in forum Ext:Bugs
    Replies: 0
    Last Post: 12 May 2011, 12:13 AM

Tags for this Thread

Posting Permissions

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