Struts JQuery Tree - Not able to get the value of Multi selection

113 Views Asked by At

In Struts2 jQuery plugin, if i include checkbox="true" line in the below code, it is not calling the below jquery function treeClicked, But if remove that line(Single selection) we can able to call the jquery function, what code should be corrected below, in order to use multi selection option in Struts Jquery Tree.

<sjt:tree id="treeStatic" jstreetheme="apple" openAllOnLoad="true" 
                onClickTopics="treeClicked"
                checkbox="true"
                checkboxCheckAllTopics="checkAllNodesTopic"
                checkboxUncheckAllTopics="uncheckAllNodesTopic"
                checkboxShowTopics="showCheckboxesTopic"
                checkboxHideTopics="hideCheckboxesTopic">
                    <sjt:treeItem title="Alphabet">
                        <sjt:treeItem title="A"/>
                        <sjt:treeItem title="B"/>
                        <sjt:treeItem title="C"/>
                        <sjt:treeItem title="D"/>
                </sjt:treeItem>
            </sjt:tree>
$.subscribe('treeClicked', function (event, data){
    var item = event.originalEvent.data.rslt.obj;
    alert(item.text().trim());
});
0

There are 0 best solutions below