CheckBoxTree and TreeSelectionListener

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.

CheckBoxTree and TreeSelectionListener

Postby Reyada Wolak » Wed Aug 10, 2011 11:19 pm

Hi,

I'm trying to get one event when selecting a box containing all the selected paths after clicking. TreeSelectionListener is always returning two events (add,remove in order) by default. Using setSingleEventMode(true) will through many events not one event.

Code: Select all
CheckBoxTree.getCheckBoxTreeSelectionModel().addTreeSelectionListener(new TreeSelectionListener()
        {
            public void valueChanged(TreeSelectionEvent e)
            {
            }
        });


Is there a way to make "remove event" before "add event". The reason is that I'm trying to manipulate a data structure and "remove even" is removing some nodes from the parent node even thought the parent is selected i.e. is i have this structure:

a--
|-b
|-c

a,b are selected

if you select c, "add event" will add the path "a" then "remove event" will remove "a-b". i have data structure that is adding/removing with any change in the tree. with this order the data for "a-b" will be lost even though it is selected.

i'm using the latest version 3.1.1
Reyada Wolak
 
Posts: 10
Joined: Tue May 26, 2009 9:03 pm

Re: CheckBoxTree and TreeSelectionListener

Postby JIDE Support » Thu Aug 11, 2011 9:07 am

Thanks for bug report. Will fix it in later release. Please rely on CheckBoxTreeSelectionModel#getSelectionPaths() for now to take actions as a workaround in current release.

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

Re: CheckBoxTree and TreeSelectionListener

Postby JIDE Support » Thu Sep 29, 2011 9:45 pm

Just so you know, this is fixed in 3.2.3 just released.

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

Re: CheckBoxTree and TreeSelectionListener

Postby Reyada Wolak » Sat Oct 01, 2011 10:29 pm

many thanks.
still setSingleEventMode(true) results in firing many events.
Reyada Wolak
 
Posts: 10
Joined: Tue May 26, 2009 9:03 pm

Re: CheckBoxTree and TreeSelectionListener

Postby JIDE Support » Mon Oct 03, 2011 2:38 pm

Will fix that issue in next regular release.

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

Re: CheckBoxTree and TreeSelectionListener

Postby JIDE Support » Fri Oct 21, 2011 3:53 pm

Just so you know, this is fixed in 3.2.4 just released.

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

Re: CheckBoxTree and TreeSelectionListener

Postby Reyada Wolak » Sun Oct 23, 2011 12:48 am

many thanks. it works great
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: No registered users and 9 guests