views:

113

answers:

1

hi,

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.

A: 

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();

RAS