@SuppressWarnings("unchecked")
public void setTree(UIComponent treeComp)
{
// this bean's lifecycle is application. this method is called
// per user, so don't change any state on this bean.
UIXTree tree = (UIXTree) treeComp;
Map<String, Object> attrs = tree.getAttributes();
final String _key = "org.apache.myfaces.trinidaddemo.vuew.faces.ComponentTree";
// has this tree been initialized?
if (attrs.get(_key) == null)
{
// tree has not been initialized.
attrs.put(_key, Boolean.TRUE); // mark as initialized
RowKeySetTreeImpl state = new RowKeySetTreeImpl(true);
tree.setDisclosedRowKeys(state);
}
}