View Full Version : Nested Data (AjaxProxy) spread over separated views

28 Nov 2010, 8:00 AM

I'm currently working on an Multi Item Counter as Sencha Touch Application.
You could find the code here >> http://code.google.com/p/itemcounter/ (Tab: Source)
And there is a Demo (latest) >> http://counter.baiz.org/ (Works only partly well)

One JSON file keeps the data for two views (xtype: list).
List view 1 entry triggers the 2nd view list. I don't use a
TreeView or Nested List, as the data needs different views.
How can I load the data into the Store of the second view?

Bit longer:
I'm sadly quite new to Sencha Touch, but I've got quite far in short time.
A college of mine, helped me to build the application MVC based. But
currently I'm stuck at the Nested Data usage spread over two views. :(

I'm using a AjaxProxy to statically load the Data (I've planed to change that later).
So I setup two Models/Stores (Called: Presets & Counter) where "Counter" is a child
of "Presets". Both Stores are bind to a separated views, in this case a xType "List".
If you Tap on a "Preset Entry", the second view gets called and should load all
"Counter Items" belonging to that Preset. But I don't find out how that works.
(For now I'm using two separated DataAssets to test the App, but this is bad.)

I read a lot about that, "hasManny", "belongsTo", "reader", "proxy" ... and I tried
to abstract the knowledge I could gain from the nice Examples .. but it all in all
doesn't work.

I really need help here, please. Could you point me to special Documentation
or a fitting code Example. Or best, post some code lines here :) Do you need
any special / additional Info from me? Many thanks in advance for your Help!

Greez Jens