View Full Version : Need to use numeric-only uuid's for identifier strategy
buffalo billion
17 May 2012, 5:51 AM
Using Sencha 2.0.1, and need number-only (values that can be convertible to Java longs) identifier strategy. How can I go about doing that?
mitchellsimoens
21 May 2012, 6:12 AM
Ext.data.identifier.Uuid will get some alpha and dashes in it.
buffalo billion
21 May 2012, 8:14 AM
Right...wondering if there was any way to use UUID without the alpha and dashes...
Möhre
22 May 2012, 7:01 AM
That´s quite easy:
If you use this on your model define...
config: {
identifier : 'sequential'
you will get 1,2,3,4 etc. ids.
http://docs.sencha.com/touch/2-0/#!/api/Ext.data.identifier.Sequential
Tip, if you store your serverdata to localstorage:
http://www.sencha.com/forum/showthread.php?207628-localStorage-Usage-tip-How-to-use-the-ID-correctly
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.