Home > Web Front-end > JS Tutorial > body text

Dynamically refresh the js code of the dorado tree_javascript skills

WBOY
Release: 2016-05-16 18:51:28
Original
1045 people have browsed it

function flushDataTree()
{
dataset_mainMenuTemp.setShowLoadingTip(true);
var rootNode = tree_Menu.getFirstRootNode();
tree_Menu.setCurrentNode(rootNode);
tree_Menu.expandNode(rootNode);
dataset_mainMenu.clearData();
dataset_mainMenuTemp.flushData();
dataset_mainMenuTemp.flushDataAsync(function(succeed)
{
if (!succeed) return;
dataset_mainMenuTemp.disableControls();
try {
dataset_mainMenuTemp.moveFirst();
while (!dataset_mainMenuTemp.isLast())
{
var record=dataset_mainMenuTemp.getCurrent();
var node = new RecordTreeNode(record, rootNode.getTreeLevel().getTreeLevel("level_menu"));
rootNode.addNode(node);
dataset_mainMenuTemp.moveNext();
}
}catch(e)
{
alert(e.message);
}
finally {
dataset_mainMenuTemp.enableControls();
flushThirdLevelNode();
}
});
}
function flushThirdLevelNode(){
try {
dataset_myMailBox.parameters().setValue("myBoxCoding","box03");
dataset_myMailBox.flushData();
//将当前节点展开
var currentNode=getCurrentNodeNum(3);
tree_Menu.expandNode(currentNode);
//向dataset中新增一条节点数据
dataset_myMailBox.disableControls();
dataset_myMailBox.moveFirst();
while (!dataset_myMailBox.isLast())
{
record=dataset_myMailBox.getCurrent();
var node = new RecordTreeNode(record, currentNode.getTreeLevel().getTreeLevel("level_myMailBox"));
//新增节点
currentNode.addNode(node);
dataset_myMailBox.moveNext();
}
}catch(e)
{
alert(e.message);
} finally {
dataset_myMailBox.enableControls();
}
}

Related labels:
js
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!