On 12/09/2011 03:30 PM, Emmanouil Batsis (Manos) wrote:

Looking around the APIs and all, but haven't figured out how to have a
LabelTree rendered with the tr

To answer my own email, it's all about

// select the apropriate node, in my case a
// DefaultMutableTreeNode
tree.getTreeState().selectNode(selectedNode, true);

// call a recursive method to
// expand accordingly
expandToNode(selectedNode);

// the method can be something like
private void expandToNode(DefaultMutableTreeNode node) {
        tree.getTreeState().expandNode(node);
        if(!node.isRoot()){
                expandToNode((DefaultMutableTreeNode) node.getParent());
        }
}


I still need to figure out how to scroll into-view though, I've wrapped the trees into fixed-height divs.

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to