public class BeanClass
{
private TreeModel treeModel;
public List<BaseTreeNode> loadChildren(FolderNode parent)
{
List<BaseTreeNode> children = new ArrayList<BaseTreeNode>();
List<String> folders = ; // load from web service
for (String folder : folders)
children.add(new FolderNode(treeModel, parent, folder));
List<String> files = ; // load from web service
for (String file : files)
children.add(new FileNode(treeModel, parent, file));
return children;
}
public class FolderNode
extends TreeNodeBase
{
...
protected List<BaseTreeNode> loadChildren()
{
return loadChildren(this);
}
}
}
On 6/27/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
Andrew: First of all, thank you - this is greatly appreciated.
I only have one question at this point, the line:
return <Your business code class here>.loadChildren(this);
Means what?
Do you have an example of the inner class that could be used?
Thanks,
--Todd
public class ContentMgmtFolderNode
extends BaseTreeNode
{
ContentMgmtFolderNode(TreeModel model, BaseTreeNode parent, String name)
{
super(model, parent, "folder", name, name, false);
}
/**
* @see
com.outlooksoft.cpm.faces.model.BaseTreeNode#loadChildren()
*/
@Override
protected List<BaseTreeNode> loadChildren()
{
return <Your business code class here>.loadChildren(this);
}
}