문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top