How to get the CheckedComponent id in CheckBoxTree

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

How to get the CheckedComponent id in CheckBoxTree

Postby venkataratna » Tue Aug 21, 2012 12:40 am

Hi,

I am Using CheckBoxTree. I have one small doubt.

i.e. How to get the CheckBox Checked Values?

If I need LastselectedPathComponent id is,

Code: Select all
 DataNode checkBoxSelectedNode=(DataNode) myCheckBoxTree.getLastSelectedPathComponent();
checkBoxSelectedNode.getProperty("id");


Here id –is Tree Node ID.(Every Node have individual ID.)

Here i am getting LastSelectedPathComponent value.

But i am straggling about how to get the LastCheckedComponent Property Id.

And CheckBoxCheckedComponent Values (Not Last)?

If I checked any Node, I need to get that Particular Node ID.like SelectedPathComponent ID.


Please help me how to get the Checkbox Checked Component id's.

It is Very Urgent.

Thanks,
Venkata.
venkataratna
 
Posts: 12
Joined: Tue May 29, 2012 4:22 am

Re: How to get the CheckedComponent id in CheckBoxTree

Postby JIDE Support » Tue Aug 21, 2012 11:36 am

Please add a TreeSelectionListener() to CheckBoxTreeSelectionModel/CheckBoxTree. Selected tree paths could be retrieved by TreeSelectionEvent#getPaths() in the listener. Then get the selected node by TreePath#getLastPathComponent(). Please give CheckBoxTreeDemo a try.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36468
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: Google [Bot] and 5 guests

cron