PDA

View Full Version : Store with 2 Trees attached



LukasP
3 Jun 2008, 9:02 AM
I have a question about the current design of Store, Binder and Tree:

I have a certain TreeModel which I would like to display on 2 different Trees but:

Tree 1 should display only leafs of the TreeModel
Tree 2 should display the whole TreeModel
There should be only 1 Store (otherwise I would have to duplicate my data...)
I can not use a StoreFilter as it is impossible to show "leafs only" - the parent node is always rendered, tooIs there a way to do this?

Best

assassin
9 Jun 2008, 12:19 AM
Why not use two stores and when the store data is changed the other store must be updated. You can do this with the DataChange event on the store.

DataChange : TreeStoreEvent(store)
Fires when the data cache has changed, and a widget which is using this Store as a Model cache should refresh its view.

store : this Regards,
Rick