PDA

View Full Version : Uncaught TypeError: Cannot read property 'internalId' of undefined



diablo
21 Nov 2012, 10:15 AM
I found some topics on this thema but nothing really helped me. Below my case.

This happens when i try to replace the content of the tree with another.
Old tree looks like this:


File
|_ File1_en (id:123_1)
|_File2_en (id:456_1)


new tree looks like this:


File
|_ File1_de (id:123_2)
|_File2_de (id:456_2)





var oldTree = original tree;
var newTree = same tree in different language;
oldTree .store.setRootNode(newTree.store.getRootNode());


the content is succesfully replaced but somehow i get this error when i try to expand/collapse + i get doubled nodes. I tried to clear, destroy the old entries, but it doesn't bring to much...

Any ideas? Thanks!

droessner
21 Nov 2012, 11:26 AM
Sounds like it may be related to this bug:

http://www.sencha.com/forum/showthread.php?244591-4.1.2a-Ext.tree.View.onFillComplete-uses-too-many-records

diablo
22 Nov 2012, 2:13 AM
@droessner - thank you for your reply but i think it's not the same case because i am using 4.0.7 and the referenced code from the thread you indicated is not available.

any other ideas? thx

Farish
22 Nov 2012, 4:14 AM
does setting animCollapse: false on the tree help?

diablo
26 Nov 2012, 12:49 AM
@Farish does it relate to tree node collapse? Just for tryout i test it, unfortunately brings nothing...

Farish
26 Nov 2012, 12:54 AM
are you setting an id config for the nodes? that might cause duplication if its not set. try adding a unique id to each of your node and see if it changes anything.

I am not sure what could be causing the problem but just putting forward some suggestions which might work. Also, if you share your code, someone might be able to figure out whats wrong. also mention your Ext version.

diablo
26 Nov 2012, 4:10 AM
@Farish - please read more carefully the topic before you respond to it. The Ext version, unique ids and code snippet are available.

some other ideas?