これは、これに対処するための最後の手段です。
問題は、以下のサンプル データから特定の値を取得できないことです。
急いでいるので、この問題について何か答えていただければ幸いです。
これは私が持っているコードです。
$("#organize").jstree(
{
"core": {'animation': 100},
"json_data": {
"data": [
{
"data": "J",
"id": "10600_10600",
"metadata": {
"id": "10600_10600",
"name": "10600_10600"
}
}]
},
"themes": {
"theme": "classic",
"url": "<%=request.getContextPath()%>/approval/css/jstree.css"
},
"plugins": ["themes", "json_data", "ui"]
}).bind("dblclick.jstree", function (e)
{
alert($('#organize').jstree('get_selected').attr('id'));
////////////TODO: Can not get ID here/////////////////
});
$('#add').click(function ()
{
//HERE I can get 'name' of the selected node but 'id' is undefined.
var name = $("#organize").jstree('get_selected').text();
var id = $("#organize").jstree('get_selected').attr('data');
});