-
1. Re: Order of nodes in recursiveTreeNodesAdaptor
anders.norgaard Oct 6, 2008 7:24 AM (in response to alsha)Have you tried sorting your
nodes="#{dir.directories}"
? (Just wondering)
- Anders -
2. Re: Order of nodes in recursiveTreeNodesAdaptor
alsha Oct 6, 2008 7:56 AM (in response to alsha)yes, the directories are properly sorted, I can control that.
But the problem is, that each recursion of recursiveTreeNodesAdaptor renders first the nodes of treeNodesAdaptor (files) and than the chilfren (sub-folders) -
3. Re: Order of nodes in recursiveTreeNodesAdaptor
cesarp Oct 6, 2008 3:02 PM (in response to alsha)How do you sort them? I implemented my own comparator to use it with the sort method from the Arrays class so it puts the folders first and then the files and it works just fine.
-
4. Re: Order of nodes in recursiveTreeNodesAdaptor
alsha Oct 7, 2008 3:19 AM (in response to alsha)It means, that you have a single List for Files and Dirs?
But my model looks a little bit different:
class Directory {
List directories; // children
List files;
}
I can sort the lists only separatly... -
5. Re: Order of nodes in recursiveTreeNodesAdaptor
david03 Apr 29, 2011 5:19 AM (in response to alsha)Hi,
regarding the directories/files example, what kind of bean strucutre do you use?
I am using beans (DirectoryTreeNode, FileTreeNode) extended from TreeNode. The problem is DirectoryTreeNode bean can't manage two kind of children, subdirectories and files.
I'm not sure how to solve this issue.