loads data to the specified branch, as direct children of the node with the ID provided
id | id | branch ID |
callback | function | callback function |
url | string | data URL |
promise | the result of a request for branch data |
$$("tree").loadBranch("branchId", null, "data.php");
$$("tree").loadBranch("branchId", null, "data.php").then(function(data){
var json = data.json();
});
The method returns a promise that:
$$("tree").loadBranch("branchId", null, "data.php").then(function(data){
var json = data.json();
});
$$("tree").loadBranch("branchId", null, "data.php").fail(function(){
// your code here
});
// catch() is the Webix alias of fail()
$$("tree").loadBranch("branchId", null, "data.php").catch(function(){
// your code here
});