Pergunta

I am using dynatree for loading geographical locations in a hierarchical fashion. I have to programmatically select large number of nodes depending on the response from web service. It takes long time to render it on the GUI. IN FF, It takes atleast 3 mins, and in IE 8, I get slow script error. I use the following code to select the nodes in a loop.

tree.getNodeByKey(data).select()

Any help would be appreciated.

Foi útil?

Solução

If the server could set the select attibutes of the nodes when sending them to the client, this would be more efficient, of course.

If that is not an option, you may consider another pattern, assuming you have an array of keys that should be selected:

Use tree.visit() to iterate over all nodes, and call node.select(), if node.data.id is a member of the array.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top