Deselection problem in CheckBox Tree

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.

Deselection problem in CheckBox Tree

Postby rathinamsm » Thu Jan 05, 2012 6:49 am

Hi Team,

I'm trying to use "Check Box Tree" using the Jide evaluation Version 3.3.2.
In the sample i'm have 2 CheckBoxTree with 3 Levels in Left and Right tree.
For Example:

Left Check Box Tree:

- Left Root
----- Level 1: Parent 1
----- ----- Level 2: Parent 1.1
----- ----- ----- Level 3 : Child 1
Level 3 : Child 2
Level 3 : Child 3
Level 3 : Child 4
-----Level 2: Parent 1.2
----- ----- (checked) Level 3 : Child 1
(checked) Level 3 : Child 2
(checked) Level 3 : Child 3
(checked) Level 3 : Child 4

When I Select the child in Left tree, i updated the RIGHT TREE. As a result the right tree is generated

Right Check Box Tree:

(All the checkbox are selected)
- Right Root
----- Level 1: Parent 1
----- ----- Level 2: Parent 1.2
----- ----- ----- Level 3 : Child 1
Level 3 : Child 2
Level 3 : Child 3
Level 3 : Child 4

Pre-Step: I selected all the childern in right tree.
My Need is:
Step 1: If I deselect the checkbox in "Child 4" in "Right Check Box Tree: Parent 1.2"

Expected Result:
1. I Need to remove the deselected Item. [ "Child 4" from Level 2: Parent 1.2. from the Right Tree ]
2. And to "Deselect the CheckBox" the same level child in Left Tree. [ remove ]

But the "Right Tree Checkbox: TreeSelectionListener" is triggered multiple times for
1. Removing of - Right RootParent and Adding of Child 1, 2, 3..

How to perform this operation.? to Achieve the Expected Result.
Please suggest is there any method to use in Jide. or Is there any alternate to handle this problem

Regards
Rathinam.M
rathinamsm
 
Posts: 40
Joined: Wed Nov 02, 2011 5:36 am

Re: Deselection problem in CheckBox Tree

Postby JIDE Support » Thu Jan 05, 2012 9:54 am

Please invoke CheckBoxTreeSelectionModel#setSingleEventMode(true) to have one event only.

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

Re: Deselection problem in CheckBox Tree

Postby rathinamsm » Thu Jan 12, 2012 10:33 pm

Hi,

With the continuation of the previous question, in CheckBox tree if the "parent node" checkbox is in "Mixed" state and if i try to use "removeSelectionPath" for the Parent Node is not reflecting".

Could you please suggest where could be the problem.?
rathinamsm
 
Posts: 40
Joined: Wed Nov 02, 2011 5:36 am

Re: Deselection problem in CheckBox Tree

Postby JIDE Support » Fri Jan 13, 2012 8:15 am

When it's in mixed state, that means the node is not selected. That's why removeSelectionPaths() won't take effect. Please invoke addSelectionPaths() first then remove it.

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

Re: Deselection problem in CheckBox Tree

Postby rathinamsm » Fri Jan 13, 2012 8:43 am

Thanks for the quick reply. I implemented the Step 1. AddSelection path and 2. RemoveSelectionPath.
Its working fine. :)
rathinamsm
 
Posts: 40
Joined: Wed Nov 02, 2011 5:36 am


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

Who is online

Users browsing this forum: No registered users and 12 guests

cron