Results 1 to 6 of 6

Thread: New rows/records in grid not selectable after ID change from server

    This duplicates another forum thread, you can visit that thread here.
  1. #1
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    39

    Default New rows/records in grid not selectable after ID change from server

    Assume a view with a grid and two buttons "New" and "Save" with the following implementation:

    Code:
    onClickNew: function () 
            var customer = Ext.create('Playground.model.Customer');
            var grid = this.getView();
            grid.getStore().add(customer);
            grid.getPlugin('cellediting').startEdit(customer, 0);
        }
    Code:
    onClickSave: function () {
            this.getView().getStore().sync();
        }
    And for the sake of completeness here's the base model of "Customer":

    Code:
    Ext.define('Playground.model.Base', {
        extend: 'Ext.data.Model',
    
        idProperty: "_id",
    
        fields: [
            { name: '_id', type: 'string' }
        ],
    
        schema: {
            namespace: 'Playground.model',
            urlPrefix: '/api',
            proxy: {
                type: 'rest',
                url: '{prefix}/{entityName:uncapitalize}s',
                pageParam: '',
                startParam: '',
                limitParam: '',
                reader: {
                    type: 'json'
                },
                writer: {
                    type: 'json',
                    nameProperty: 'mapping'
                }
            }
        }
    };
    When clicking "New" a new record is created and added to the store which the user can customize before finally clicking on "Save". When "Save" is clicked, a POST request is sent to the backend with "_id: 'Customer-1'". So far so good. Now on the serverside the new record is written to the database and the real ID returned in the JSON response: "_id: '53e32b7e0364bede1c6a7c19'". On the clientside the serverId automatically replaces the temporary clientId. Perfect!

    However, from now on the new row/record in the grid is not selectable anymore.

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2010
    Posts
    53

    Default

    Probably this is a duplicate. You can find the workaround here http://www.sencha.com/forum/showthread.php?288825 but it is only temporary because it's already fixed

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    39

    Default

    Thanks for your reply. Meanwhile I found this bug report too. Seems to be a duplicate, yes.

    Just another question of a ExtJS newbie: How and where do I get new releases, (nightly) builds, release notes etc. of ExtJS, e.g. ExtJS 5.0.1? Is there anything I missed?

  4. #4
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395

    Default

    Releases are always announced in the blog, newsletter and forums.
    There are support-only releases (i.e. Ext JS 4.2.2+) that are only available for support subscribers.

    A support subscription, among other things provides you with access to the nightly builds via the support portal and fiddle (when logged using a support-linked account).

    Release notes can be found in the docs: http://docs.sencha.com/extjs/5.0.0/w...ase_notes.html
    Israel Roldán | Senior Software Engineer (Framework tools)

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    39

    Default

    Perfect, thanks! Last question: is there anything like a roadmap or scheduled release dates so that users can see what's to come and when?

  6. #6
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395

    Default

    Unfortunately no... but we try to share as much as possible on what the features to come are via our newsletters and blog posts. Hopefully this changes in the future!
    Israel Roldán | Senior Software Engineer (Framework tools)

Posting Permissions

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