0

I'm having a problem getting selected record, here are my nested Models:

Ext.define('my.Address', {
    extend: 'Ext.data.Model',
    idProperty: '__guid__',
    fields: ['title', 'latitude', 'longitude', '__guid__']
});

Ext.define('my.POS', {
    extend: 'Ext.data.Model',
    idProperty: '__guid__',
    fields: ['__guid__', '__title__', 'password', 'image',
             'contact', 'category', {
                 name: 'address', model: 'my.Address'
             }]
});

Every times I post a record I reload the grid but getting selected record in this way:

   var rec = grid.getSelectionModel().getSelection()[0];

(rec is a my.POS) the address inside the record has guid equal to undefined. If I look into the store in this way:

  grid.store.data.items[0].data.address[0].__guid__;

guid property is present!

Note that address is an array. Someone had this problem solved?

Thanks

ivy
  • 210
  • 1
  • 2
  • 14

1 Answers1

0

I've got it! the problem is the selection! If I deselect and then select the record it works! Anyway it seems a bug...

ivy
  • 210
  • 1
  • 2
  • 14