PDA

View Full Version : Treepanel Problem



super.rotus
10 Feb 2014, 8:37 AM
Hi everyone, i'm sorry i open a lot of posts, but sometime is the only way to get some help here.

My problem is with treepanels, I have an specific json that doesnt have the proper config for using treepanels, i call an ajax when i search the information, then i call other ajax when i expand the node, every time i call the ajax i get this json.


[{"tipoOperacion":null,"servicioProcesar":"001119","servAfore":"0480 ....}]

and if a call this expander i will get the same json with other info... so the problem is the first time i get the tree perfectly, then when i expand a node it expand correctly, if i colapse and then expand it again i will get an internal id error, and the children duplicated... so i'm thinking a good solution will be restore the node every time it collapses so it will create the childrens anytime it is expanded, any sugestions?

palakurthivishal
11 Feb 2014, 8:50 AM
Hello super.rotus,
This is a wild guess on your issue. I faced this kind of issue while giving id for nodes.
Treepanel uses some of the properties to render correctly, so please make sure you are not using them while getting your response. For example using "id" in model/ fields is not preferrable unless it is unique.

super.rotus
11 Feb 2014, 10:41 AM
Hello super.rotus,
This is a wild guess on your issue. I faced this kind of issue while giving id for nodes.
Treepanel uses some of the properties to render correctly, so please make sure you are not using them while getting your response. For example using "id" in model/ fields is not preferrable unless it is unique.

Hey palakurthisivishal, i didnt configured the id, and the problem was repeating, so i debug the ext and found the problem, maybe is not the best practice, but I modified the NodeInterface.js,
and i resolve the problem. regards and thanks for answering.