PDA

View Full Version : treepanel, calling expand as many time as you expand the node.



super.rotus
7 Feb 2014, 4:16 PM
I'll try to make myself clear,
I have my treepanel well formed, and when you call the expand button it call the
onNodeExpand: function(parent, records, suppressEvent) {

from NodeStore.js, thats find, but when you collapse and then expand the node again it will call the onNodeExpand twice, or n times that you press the expand button,

Does anyone have the same problem or know why this happens?
Regards.

palakurthivishal
7 Feb 2014, 11:30 PM
Hello ,
May I know why you are concerned about that private method?

super.rotus
8 Feb 2014, 1:46 PM
Hello ,
May I know why you are concerned about that private method?

Because i didnt know what the problem is so I went to the debuger and find out what was the problem, just want to know if maybe i can override the class and resolve my problem

palakurthivishal
9 Feb 2014, 6:41 AM
Hello super.rotus,
Please look into the documentation of onNodeExpand method once
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.NodeStore-method-onNodeExpand
It says the method will be invoked by the expand event and also it says it fires the expand event again. I wasn't justified by it because, it will be an infinite loop and I'm being honest to say you that I didn't try to debug it before replying you. I would like you to checkout the itemexpand event instead if it suits your case..