Just a quick question/clarification about the current Tree in 1.3.

Is it correct that the AbstractTree only uses a TreeModel to gain
access to the root TreeNode?

Looking at the code in AbstractTree.java line 499:

// is root item created? (root item is null if the items have not
                        // been created yet, or the whole tree was dirty and 
clearAllITem
                        // has been called
                        if (rootItem == null)
                        {
                                TreeNode rootNode =
(TreeNode)((TreeModel)getModelObject()).getRoot(); <!-- look here
                                if (rootNode != null)
                                {
                                        if (isRootLess())
                                        {
                                                rootItem = 
newTreeItem(rootNode, -1);
                                        }
                                        else
                                        {
                                                rootItem = 
newTreeItem(rootNode, 0);
                                        }
                                        itemContainer.add(rootItem);
                                        buildItemChildren(rootItem);
                                }
                        }

I tried to implement my own TreeModel but noticed that it only called
getRoot() and nothing else...

Is this the intended behavior?

Does this mean that I have to implement my own TreeNode to build a dynamic tree?

/Regards Mats

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to