I would really appreciate if someone could give me a helping hand on this question. I have to deliver a proof-of-concept by Monday, so even small hints would help me tremendously. Please see below for details.
Again, thanks so much for your help. Naresh Bhatia -----Original Message----- From: Naresh Bhatia [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 5:53 PM To: [email protected] Subject: Does TreeTable support lazy loading? 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}" rowDisclosureListener="#{treeTableBean.processRowDisclosureEvent}"> ... </tr:treeTable> // 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
