removeSelectionPaths() is not working with me

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.

removeSelectionPaths() is not working with me

Postby Reyada Wolak » Thu Nov 10, 2011 12:51 am

Hi,

I'm trying to deselect all the nodes from checkboxtree. this line is not working for me:
searchTree.getCheckBoxTreeSelectionModel().removeSelectionPaths(new TreePath[]{searchTree.getPathForRow(1)});

or

searchTree.getCheckBoxTreeSelectionModel().removeSelectionPaths(new TreePath[]{new TreePath(searchTree.getModel().getRoot())});

am i doing something wrong here
Reyada Wolak
 
Posts: 10
Joined: Tue May 26, 2009 9:03 pm

Re: removeSelectionPaths() is not working with me

Postby JIDE Support » Thu Nov 10, 2011 2:20 pm

May I ask which JIDE release you are using. The first statement you use does work for me. Attached is the test case FYI. Your second one will not take effect because the TreePath does not exist inside the CheckBoxTree. Please also look at the test case for how you could select the root path.

Thanks,
Attachments
CheckBoxTreeDemo.java
(11.93 KiB) Downloaded 1443 times
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: removeSelectionPaths() is not working with me

Postby Reyada Wolak » Sun Nov 13, 2011 3:29 am

my mistake i was doing something wrong in my code.

thanks for the response
Reyada Wolak
 
Posts: 10
Joined: Tue May 26, 2009 9:03 pm


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

Who is online

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

cron