-
15 Oct 2011 10:20 AM #1
[PR 1] Ext.data.proxy.LocalStorage -> id
[PR 1] Ext.data.proxy.LocalStorage -> id
hi team,
in ST 1.x you can specify ids containing dots, like:
In ST 2 this throws the error:Code:id : 'SC.LocalSettings'
The problem is, that this error gives no clue why the id is not valid. In general it would be nice if ids can contain dots again.Uncaught Error: [ERROR][Ext.data.proxy.LocalStorage#getObservableId] Invalid unique id of 'SC.LocalSettings' for this object
-
15 Oct 2011 7:14 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
I remember n ST1 that IDs had to be int... Could be wrong but I remember seeing that
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
15 Oct 2011 11:38 PM #3
hi mitchell,
maybe i did not make my point clear: i am not refering to the id inside of a model or the storeId, but to the id of the proxy. When using local storage this is important.
see the following example which is valid in ST 1.x:
Code:Ext.regModel('SC.model.Settings', { fields : [ {name : 'email', type : 'string'}, {name : 'id', type : 'int'}, {name : 'password', type : 'string'}, {name : 'theme', type : 'string'} ], proxy: { type : 'localstorage', id : 'SC.LocalSettings' } });
-
17 Oct 2011 7:42 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Confirmed and reported

Just a note, regModel has been deprecated, the way to do it now is:
Code:Ext.define('ModelName', { extend : 'Ext.data.Model', fields : [....] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
17 Oct 2011 8:04 AM #5
-
3 Nov 2011 11:34 AM #6Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
This comes about because of some optimizations we've been making to Observable in relation to ComponentQuery. Although we never explicitly supported/did not support dots in a localstorage proxy id, I think this limitation is a price worth paying for the performance optimization so we'll probably explicitly not support ids with dots in going forward.
I suggest you change those to use a dash instead (especially given that it's just a string and the dot has no special significance anyway)Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote