Object root = model.getRoot();
node = (HtmlTreeNode) context.getApplication().createComponent(HtmlTreeNode.COMPONENT_TYPE);
String id = createUniqueId(context);
node.setId(id);
node.setPath(new TreePath(new Object[]{root}));
node.setUserObject(root);
node.setLayout(new int[]{HtmlTreeNode.CLOSED_SINGLE});
getFacets().put(FACET_ROOTNODE, node);
}