You simply did not find the correct keyword. It was called lazy loading.
You need to write something like:
$("#treeCell").jstree({
"json_data" : {
"ajax" : {
"url" : function( node ){
if( node == -1 ){
return "/list?parentkey="
} else {
return "/list?parentkey=" + node.data( "key" );
}
},
"type" : "get",
"success" : function(ops) {
data = []
for( opnum in ops ){
var op = ops[opnum]
node = {
"data" : op.info,
"metadata" : op ,
"state" : "closed"
}
data.push( node );
}
return data;
}
},
},
"core" : {"html_titles" : true, "load_open" : true },
"plugins" : [ "themes", "json_data", "ui", "cookies", "crrm", "sort" ]
});
source
share