1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    213
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default [4.1 b2] associationKey property is ignored

    [4.1 b2] associationKey property is ignored


    Below is an excerpt of my model and a grid using it, irrelevant code removed.
    Nested data didn't show up in the grid below when using the Interface model.
    After I've changed associationKey to name, which tells the reader where to find the related data and which defaults to name according to the docs, it started to work.

    Code:
    Ext.define("NAC.model.Device", {
        extend:"NAC.data.Model",
        associations:
            [{
                    foreignKey:"id_device",
                    model:"NAC.model.Interface",
                    type:"hasMany",
                    associationKey:"rel_interfaces",
                    primaryKey:"fk_device"
            }],
         ...
    });
    
    Ext.define("NAC.model.Interface", {
        extend:"NAC.data.Model",
        associations:
                [{
                    foreignKey:"fk_device",
                    model:"NAC.model.Device",
                    type:"belongsTo",
                    associationKey:"rel_device",
                    primaryKey:"id_device"
                }],
         ...
    });
    
    Ext.define('NAC.view.interface.Grid', {
        alias: 'widget.interfacegrid',
        extend: 'NAC.view.Grid',
        title: 'Interfaces',
        iconCls:'icon-interface',
        store: 'Interfaces',
        columns: [
           {header:"Device", width:250, xtype:'templatecolumn',
                tpl: '<a href="#Devices/view/{fk_device}"><tpl for="rel_device">{name}</tpl></a>'
            }
        ]
    });

  2. #2
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    213
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    Actually it seems both name and associationKey is required to make it work.

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi