View Full Version : Associations and Nested Inline Store Data

19 May 2012, 5:42 PM
I'm working on a server side framework that allows the automatic creation of stores on a page using JSP or JSF tags. Defining the store and loading the data is not a problem... until I try to do it with associations.

The stores are being defined correctly... and in the case of a "hasMany" association I can inspect the store and see that an associated store is being automatically generated as part of the model. But the inline data does not populate the stores on the model.

Reading the forums, I see a several references in Ext 3 and ST 1 that suggest nested data can only populate associations properly when loaded via a proxy. Is that still the case in Ext 4 (and ST2)? That seems to be the behavior I'm seeing but there's very little information on the subject.

These associations could potentially be extremely powerful... but I'm not sure they're currently implemented in a way to take full advantage of that potential.

Found this bug report after my initial comments above: http://www.sencha.com/forum/showthread.php?182157-Associations-hasOne-and-belongsTo-seem-to-be-broken-with-inline-associated-data

Seems that this is still an issue in ST 2.0.1 and Ext 4.1?

25 May 2012, 11:15 AM
In ST2 if you have an id that is present and not zero then it should work I believe. In Ext JS 4 I believe it must be read through a reader. Ext JS 3.x does not have associations.

25 May 2012, 12:14 PM
Are you following the rules?