Hi Ripston, You're welcome!
> Thanks a lot for your extensive explanation! Things are much more > clear for me now. I understand that basically I need to do the > following: > 1) to retrieve structured JSON data; > 2) to "flatten" it into a qx.data.Array of qx.core.Object's (each of > them containing group reference); > 3) to create and maintain an index (a simple JavaScript associative > array). Right. > So two more questions now. > > First is about JSON data retrieval. If not using qx.data.store.Json, > how do I retrieve JSON data in the most elegant and concise way? I > would prefer to avoid low-level messing with qx.io.request.Xhr. What > do you think about extending qx.data.store.Json to provide my own > logic for conversion of JSON into an array of qx objects? Maybe it is not necessary to extend the json store implementation. I think you can use a delegate to provide your own logic for conversion. Just define a object with a manipulateData[1] method and create the store with it. [1] http://demo.qooxdoo.org/2.1.1/apiviewer/#qx.data.store.IStoreDelegate~manipulateData > The second question deals with indexed access to the model. If we > create a separate entity for index (like that "lookup" JavaScript > array in your example), we will have to maintain its integrity, like > indexing elements when they are added, and removing an index upon > element removal. I'm thinking about encapsulating this logic into the > model itself. Again, what do you think about extending qx.data.Array > with indexing facilities and some get(key) method? (or maybe creating > a mixin for that?) You are right. I think the best way would be to extend the qx.data.Array and encapsulate the logic into it. This should work with the virtual list, because it needs only an object which implements the qx.data.Array interface. When you get some truble with it than it is a bug. Could you please give me your feedback wether it worked or not? Thanks, Chris -- View this message in context: http://qooxdoo.678.n2.nabble.com/Creating-grouped-list-from-group-structured-JSON-data-tp7583449p7583489.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
