[richfaces-issues] [JBoss JIRA] Updated: (RF-10190) TreeState.expandNode doesn't work recursively for leaf nodes

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Wed Jan 12 18:58:50 EST 2011


     [ https://issues.jboss.org/browse/RF-10190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-10190:
--------------------------------

         Assignee: Nick Belaevski
    Fix Version/s: Future_3.X


> TreeState.expandNode doesn't work recursively for leaf nodes
> ------------------------------------------------------------
>
>                 Key: RF-10190
>                 URL: https://issues.jboss.org/browse/RF-10190
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tree
>    Affects Versions: 3.3.3.Final
>            Reporter: Gergely Nagy
>            Assignee: Nick Belaevski
>             Fix For: Future_3.X
>
>
> TreeState.expandNode(UITree, TreeRowKey) is apparently supposed to expand the node at the specified key, going recursively up along its parents and opening those as well. However, there is an if-statement which skips this logic for leaf nodes (for no apparent reason since the traversal is going up not down). I would expect this expansion to also work for leaf nodes.
> Offending code snippet:
> if (!tree.isLeaf()) {
> 	TreeRowKey key = rowKey;
> 	
> 	while (key != null && key.depth() != 0) {
> 		addQueuedState(key, NodeState.EXPANDED);
> 		key = (TreeRowKey) tree.getParentRowKey(key);
> 	};
> 	
> }
> Ugly workaround exists: add a dummy child to a leaf node, expand, and then remove the dummy child. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list