PDA

View Full Version : Has anyone got a NestedList to update with new data?



aondevuser1
14 Jun 2011, 2:12 PM
On the first card of my Nestedlist I have a searchfield on the toolbar and I want the replace the tree data with new tree data in my Nestedlist. I can't seem to find where anyone has done this.

I am getting new data via an Ajax call because it requires more than just filtering what I have, hence why I am not using the Store's filters.

I was hoping to get new data and pass it into a loadData() function, but Nestedlist doesn't work that way.

bclinton
14 Jun 2011, 8:04 PM
I think you are looking for store's add or insert methods.

aondevuser1
15 Jun 2011, 6:32 AM
Interesting. I don't see these functions in the current API. I recently learned that there is another undocumented "repopulate" function for the TreeStore as well. I figure they were old functions that were removed. Just kinda frustrating.

bclinton
15 Jun 2011, 7:08 AM
Which docs are you looking at? Both methods are listed here:

http://dev.sencha.com/deploy/touch/docs/?class=Ext.data.Store

aondevuser1
15 Jun 2011, 7:30 AM
I am using version 1.1 and I am getting an error saying "Object [object Object] has no method 'repopulate'".

I was looking at the TreeStore API. You would think that if it extends Store that those methods would not be lost.

bclinton
15 Jun 2011, 7:37 AM
Oh, I'm sorry. TreeStore doesn't extend Store. They are both subclasses of AbstractStore. I haven't really used Trees in Touch yet.

aondevuser1
15 Jun 2011, 7:40 AM
I haven't heard of anyone successfully doing this with Sencha Touch 1.1 yet. I guess that is what it means to be on the bleeding edge.

Sahel
27 Jun 2011, 6:49 AM
Anything new ?

MattUCG
26 Aug 2011, 7:23 AM
bump