jpcook01
24 Aug 2011, 12:49 AM
Hi,
I am trying to get the uuid generation working, I have the following model:
Ext.define('NavBuilder.NavigationNode', {
extend: 'Ext.data.Model',
idgen: 'uuid',
proxy: {
type: 'memory'
},
fields: [
{ name: 'id', type: 'string'},
{ name: 'text', type: 'string'},
{ name: 'url', type: 'string'},
{ name: 'containerType', type: 'string'},
{ name: 'isFrontPage', type: 'boolean'},
{ name: 'isCrumb', type: 'boolean'},
{ name: 'activateWhenSiblingsActive', type: 'boolean'},
{ name: 'activateWhenParentActive', type: 'boolean'},
{ name: 'activateWhenAncestorActive', type: 'boolean'},
{ name: 'alwaysActive', type: 'boolean'},
{ name: 'hideChildren', type: 'boolean'},
]
});
Creating an instance of this object:
var node = Ext.create('NavBuilder.NavigationNode', {
text : 'hello'
});
console.log(node);
I would expect to see a uuid for the id of this object but I just get an id of ext-record-5. Is there something else I need to do in order for the unique id generation to work?
Thanks
Jonathan
I am trying to get the uuid generation working, I have the following model:
Ext.define('NavBuilder.NavigationNode', {
extend: 'Ext.data.Model',
idgen: 'uuid',
proxy: {
type: 'memory'
},
fields: [
{ name: 'id', type: 'string'},
{ name: 'text', type: 'string'},
{ name: 'url', type: 'string'},
{ name: 'containerType', type: 'string'},
{ name: 'isFrontPage', type: 'boolean'},
{ name: 'isCrumb', type: 'boolean'},
{ name: 'activateWhenSiblingsActive', type: 'boolean'},
{ name: 'activateWhenParentActive', type: 'boolean'},
{ name: 'activateWhenAncestorActive', type: 'boolean'},
{ name: 'alwaysActive', type: 'boolean'},
{ name: 'hideChildren', type: 'boolean'},
]
});
Creating an instance of this object:
var node = Ext.create('NavBuilder.NavigationNode', {
text : 'hello'
});
console.log(node);
I would expect to see a uuid for the id of this object but I just get an id of ext-record-5. Is there something else I need to do in order for the unique id generation to work?
Thanks
Jonathan