This duplicates another forum thread, you can visit that thread
here.
-
Sencha Premium Member
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.
-
Sencha Premium Member
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
-
Sencha Premium Member
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?
-
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)
-
Sencha Premium Member
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?
-
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)