loadBranch

loads data to the specified branch, as direct children of the node with the ID provided

promise loadBranch(id id,function callback,string url);

Parameters

ididbranch ID
callbackfunctioncallback function
urlstringdata URL

Returns

promisethe result of a request for branch data

Example

$$("fmanager").loadBranch("branchId", null, "data.php");
 
$$("fmanager").loadBranch("branchId", null, "data.php").then(function(data){
    var json = data.json();
});

Related samples

Details

The method returns a promise that:

  • is resolved when the data are loaded
$$("tree").loadBranch("branchId", null, "data.php").then(function(data){
    var json = data.json();
});
  • is rejected when a loading error occurs or if an attempt to load the same portion of data was made
$$("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
});
See also
Back to top