[
https://issues.apache.org/jira/browse/PIVOT-718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027508#comment-13027508
]
Sandro Martini commented on PIVOT-718:
--------------------------------------
Hi and sorry for the delay ... I've started to look at the problem:
it seems that any time I try to delete a Tree node that's not in the first
level, something wrong happens and the node (or the leaf) is not deleted.
For example, running the Pivot718.java (derived from this test) if I delete a
first level Node like "Activity", or "Occasion" all is Ok, but trying to delete
a child element (could be a child of "Occasion", like the Node "Holidays", or a
leaf one level under like "Independence Day") the element is not deleted.
I've seen that the indexOf() in TreeBranch, doesn't compare the nodes on the
same level of the element selected for deletion (it loops only on first level
nodes), so in this case it's not found and not deleted.
At this point I'm not sure that this is the cause of the problem seen by
Laurent ... or if it is another.
Comments ?
> TreeViewSelectionListener not invoked
> -------------------------------------
>
> Key: PIVOT-718
> URL: https://issues.apache.org/jira/browse/PIVOT-718
> Project: Pivot
> Issue Type: Bug
> Components: wtk
> Affects Versions: 2.0
> Environment: jkd1.6,linux
> Reporter: laurent Gebus
> Assignee: Sandro Martini
> Priority: Minor
> Fix For: 2.0.1
>
> Attachments: TreeSelect.bxml, TreeSelect.java
>
>
> I have a TreeView with a TreeViewSelectionListener, but the listener doesn't
> get invoked when a item is removed from the tree.
> I do : tree.getTreeData().remove( tree.getSelectedNode());
> tree is refreshed : the removed node is no longer shown, no node is selected
> but the listener is not invoked.
> Looked at the code :
> in TreeView#itemsRemoved(), clearAndDecrementPaths() is invoked and returns
> 0. But Listeners are only invoked when > 0 is returned.
> see attached example comparing a TreeView to a ListView
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira