0
처음으로 & 열기의 checked_id에 대한 동적 값을 사용하고 있습니다. checked_id에, 나는 '"skillTree_1576","skillTree_1573"'
값을 할당했지만 하나 그것에 대해 생각을 가지고 있다면 다음의가 .... 잘 작동 다음 정적 통과 같은 값이 소스 코드jstree에서 선택된 노드를 어떻게 얻을 수 있습니까?
$("#"+node_id+"Edit").live("click", function(){
$('#'+node_id+'Lookup').show();
$('#'+node_id+'Values').hide();
$("#"+node_id).bind("check_node.jstree", function (e, data) {//check all parent nodes
var currentNode = data.rslt.obj.attr("id");
var parentNode = data.rslt.obj.attr("parent_id");
$("#"+node_id).jstree("check_node", "#"+parentNode);
}).bind("uncheck_node.jstree", function (e, data) {//uncheck all child nodes
var currentNode = data.rslt.obj.attr("id");
var allChildNodes = data.inst._get_children(data.rslt.obj);
allChildNodes.each(function(idx, listItem) {
var nid = $(listItem).attr("id");
$("#"+node_id).jstree("uncheck_node", "#" + nid);
});
}).jstree({"0":"","plugins":["themes","json_data","ui","search","hotkeys","checkbox"],"checkbox":{
"real_checkboxes":true,"two_state":true,"checked_parent_open":true,"override_ui":true
},"themes":{"theme":"classic","dots":true,"icons":false},"json_data":{
"ajax":{"url":baseUrl+url,"data":function (n) {
return {'node_name': node_id, 'operation' : 'lookup_children', 'id' : n.attr ? n.attr('id').replace(/[a-z0-9A-Z]+_/g,'') : 0 };
$('#'+node_id+'emptySearch').hide(); },"success":function(){}}},"search":{
"show_only_matches":false,"ajax":{
"url":baseUrl+url,"data":function (str) {if(str.length > 2) {
return {'node_name': node_id, 'operation' : 'search', 'search_str' : str}; } },"success":function (data) {
if(data.length == 0) { $('#'+node_id+'emptySearch').show();
} else {
$('#'+node_id+'emptySearch').hide();}}}},"ui":{"initially_select":[checked_id] },"core":{
"initially_open":[checked_id],"load_open":true,"open_parents":true}});
// alert ('hello : '+checked_id);
});
경우는 작동하지 않습니다 ... 도와주세요 나 .. 당신은 다음과 같이 사용할 수있는 여러 ID를 선택하기위한 사전
이 내가이 분야에서의 작업을 잘 정적 값을 전달하면 .. initially_select이라고 다중 선택을위한 옵션입니다하지만 난 변수 내가 어떻게 할 수 있도록 자사의 ... 작동하지 cheked_id 전달하는 경우 이 문제를 알아낼 수 있습니까? –
@ratneshdwivedi 바이올린을 설정하면 내가 도울 것입니다. – Amit