incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <>
Subject Does TreeTable support lazy loading?
Date Thu, 21 Sep 2006 21:53:23 GMT
Does TreeTable support lazy loading? I would like to display a very
large tree and want to lazy load the children when the user expands a
parent node. After reading the documentation I thought that the
RowDisclosureEvent could be used for this, but I don't readily see how.
This is what I have done so far:

// Set the treeModel and rowDisclosureListener for the tree table
<tr:treeTable var="node" value="#{treeTableBean.treeModel}"

// Here's the bean method that returns the tree model
// ************ Just return the root node ***********
public TreeModel getTreeModel() {
    if (treeModel == null)
        TreeNodeVO root = getTreeService().getTreeNode("CORP");
        treeModel = new ChildPropertyTreeModel(root, "children");

At this point I see a TreeTable on my page with just the root node, but
no arrow to expand it. So here are my questions:

1) Since the root node cannot be expanded, the rowDisclosureListener
will not be called. Even if it is called, how can I use the event to
lazily connect the children to the root node? How does the event tell me
what to fetch next and where to put this information?
2) Currently I have my bean in request scope. Does TreeTable, especially
with lazy loading, require the bean to be in the session scope?

Thanks for your help.

Naresh Bhatia

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message