In GWT-EXT checkboxtree how to handle single selection of tree nodes?
-
27-09-2019 - |
문제
I'm working on checkBoxTree in GWT-EXT 2.0.3 with Java. My aim is to get a selectionModel which allows me to select(check) only one TreeNode at a time. If I select another TreeNode after selecting one then, the previous one should be unchecked. I've tried using DefaultSelectionModel with TreePanel, but either I've not used it properly or it's working only for selection of TreeNode not for checking a TreeNode. Can anyone help me in this? Or even if anyone could tell me how can I check whether a TreeNode's checkbox is checked or not, then it would also be fine.
Thanks in advance.
해결책
ok. I got one Thing. How to check whether a TreeNode's checkBox is checked or not.
TreeNode[] tn = treePanel.getchecked();
for (TreeNode node: tn) {
treePanel.getNodeById("abc").getUI().isChecked();
}
& to toggle it
treePanel.getNodeById("team-a").getUI().toggleCheck();
제휴하지 않습니다 StackOverflow