我正在尝试让jsTree处理子节点的按需加载.我的代码是这样的:
jQuery('#introspection_tree').jstree({
"json_data" : {
"ajax" : {
url : "http://localhost/introspection/introspection/product"
}
},
"plugins" : [ "themes", "json_data", "ui" ]
});
从通话中返回的json是
[
{
"data": "Kit 1",
"attr": {
"id": "1"
},
"children": [
[
{
"data": "Hardware",
"attr": {
"id": "2"
},
"children": [
]
}
],
[
{
"data": "Software",
"attr": {
"id": "3"
},
"children": [
]
}
]
]
}
.....
]
每个元素都可能有很多孩子,树会很大.目前这是一次加载整个树,这可能需要一些时间.当用户打开子节点时,如何实现按需加载子节点,我该怎么办?
提前致谢.
我正在使用OpenRefine(Google Refine)从多个来源清理数据.我有来自不同来源的文件,其中包含公司,列定义相同,即
UNID | Name | Street | City | Country | Phone | ... sg52d | Company a | A street | a city | c country | 12345 sg52d | Company a | A street | a city | c country | 0099835 dfnsd | Company B | B Street | City B | c country | 33445 dfnsd | Company B | Different | Another | c country | 33445 xxbb3 | Company C | C Street …