I am in the process of creating a JSP page that allows a user to search for something. When they click search, I load a tree to display the results. The tree shows offices as the parent nodes and brokers as the children. Since their could be as many as 200 children, part of our requirements are to add paging.
- Is it possible to add paging to a nested tree?
- Or is it possible to iterate through the store (ItemFileWriteStrore) and split it that way?
The code for displaying the tree is below:
var firmStore = new dojo.data.ItemFileWriteStore({url:"<%=request.getContextPath()%>/sumTree.do?selectedBrk="+selectedBrk+"&selectedOffice="+selectedOffice+"&lifecadCntrNum="+lifecadCntrNum+"&annName="+annName});
var firmModel = new dijit.tree.ForestStoreModel({
store: firmStore,
query: {type: typeQry},
childrenAttrs: ["children"]
});
firmTree = new dijit.Tree({
model: firmModel,
showRoot: false,
getIconClass: getCustomIconClass,
getLabelClass: getLabelClass,
_onExpandoClick: onCustomExpandClick,
persist: false
});
var firmModel = new dijit.tree.ForestStoreModel({
store: firmStore,
query: {type: typeQry},
childrenAttrs: ["children"]
});
firmTree = new dijit.Tree({
model: firmModel,
showRoot: false,
getIconClass: getCustomIconClass,
getLabelClass: getLabelClass,
_onExpandoClick: onCustomExpandClick,
persist: false
});

unfortunately not...
Unfortunately Tree doesn't have any feature like that. Maybe dojox.grid could help you but I'm not sure.
200 doesn't sound like so many to me but I guess the requirements are out of your hands.
=========
Bill Keese
Project Lead (aka BDFL) of Dijit
a follow up question....
Is it possible to loop through the nested store or the tree in order to check the number of parent (or children) nodes? or is there a size or length function that can be called. And when creating the tree programmatically - is there a way to link a function to the tree being completed. I want to display a "searching..." message until the tree is done.
Thanks for the help.