I have tree with contextmenu. How can I write with struts2-jquery plugin:
.on('changed.jstree'.. with ajax request like this: http://wp.wikirex.com/2014/04/13/contextmenu-plugin/
and this is complete example - view HTML source:
http://www.jstree.com/demo_sitebrowser/
I need to have simple generated from struts2 plugin JavaScript:
$('#some_tree').on(...// listeners for event
<sjt:tree
name="groupsTree"
id="groups_tree_id"
href="%{treeDataUrl}"
jstreetheme="apple"
onClickTopics="treeGroupsClicked"
contextmenu="{
items: {
'create' : {
'label': 'New',
'action': function (obj) { console.log(obj); this.create(obj); ajaxExec('%{editNode}', {'groupsId': obj[0].id,'editaction':1}); }
},
'rename' : {
'label': 'Rename',
'action': function (obj) { return { renameItem: this.rename(obj) }; }
},
'ccp' : {
'label': 'CCP',
'action': function (obj) { ajaxExec('%{editNode}', {'groupsId': obj[0].id,'editaction':3}); }
},
'remove' : {
'label': 'Delete',
'action': function (obj) { this.remove(obj); ajaxExec('%{editNode}', {'groupsId': obj[0].id,'editaction':0}); }
}
}
}"
/>