PDA

View Full Version : node's text changed event in tree panel



cwtuan
31 Jul 2012, 1:38 AM
I'm developing the searching function in tree panel.
Tree events is important for me.
1. a new node inserted event (iteminsert (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.tree.Panel-event-iteminsert))
2. a node removed event (itemremove (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.tree.Panel-event-itemremove))
3. a node's text changed event in tree panel. -> it seems ExtJS don't support this event.
How could I implement this event by myself?

friend
31 Jul 2012, 3:39 AM
Ext.data.TreeStore (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.data.TreeStore) supports an update (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.data.TreeStore-event-update)event, which fires whenever a model instance has been updated. This might work for you.

cwtuan
31 Jul 2012, 5:28 AM
Thanks for reply.
By the way, the event iteminsert (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.tree.Panel-event-iteminsert) states that Fires when a new child node is inserted.
What's the exactly time this event fires?
after or before the node inserted?

mankz
31 Jul 2012, 10:59 AM
Should be after insert, you can verify this easily yourself by setting a breakpoint in your code and track the call chain.