Topic: Reload JSON branch on demand ?
Hello,
I use Mif Tree with Zend Framework / Php5 and Ldap directory.
When I initialize the tree, I feel it with just one level of my Ldap directory.
Clicking on each node tree loads children nodes on demand
All of this works perfeclty.
The problem is that I append thing to the Ldap directory and I need a way to refresh/reload
a particular node with all his inherited children.
How can I achieve this ?
tree = new Mif.Tree({
container: $('mytree'),
grid: true,
sortable: false,
height: 18,
forest: true,
checkbox: true,
initialize: function(){
},
types: {
dhcpGroup:{
openIcon: 'mif-tree-open-icon',
closeIcon: 'mif-tree-close-icon',
middleIcon: 'mif-tree-middle-icon'
},
dhcpHost: {
openIcon: 'mif-tree-open-icon',
closeIcon: 'mif-tree-close-icon',
middleIcon: 'mif-tree-middle-icon'
},
loader:{
openIcon: 'mif-tree-loader-open-icon',
closeIcon: 'mif-tree-loader-close-icon',
DDnotAllowed: ['inside','after']
},
},
dfltType:'folder'
});
tree.load({
url: '/catv/customer/treejson'
});
tree.loadOptions=function(node){
if(!node) return;
if(node.name=='empty'){
return {
url: '/share/empty.json'
}
}
return {
url: '/catv/customer/treejson/dn/'+node.data.dn+'?search='+ $('keywords').value
}
};
Regards