In my Vaadin 7 project, I need to ignore the parent nodes(rows) of a treetable while sorting. I am able to customize the sort using ItemSort, but I don't know how to skip the parent nodes!
FYI: I am able to identify my parent node with its ItemId.
***Update***
I'm using a Hierarchical Container, and my Tree is similar to this:
Name Nos salary
+ Male(Node 1) 5 $12000
+ Young 3 $6000
A 1 $3000
B 1 $1000
c 1 $2000
+ Old 2 $6000
A 1 $3000
B 1 $3000
+ Female(Node 2)5 $13000
+ Young 3 $5000
A 1 $2000
B 1 $1000
c 1 $2000
+ Old 2 $8000
A 1 $5000
B 1 $3000
The problem is when I sort the salary column it includes the summation of each person's salary on "Male, young & old", "Female, young & old" rows and adjusts the position of "Male, Female" and "Young, old" categories.
I just want to skip the parent nodes in my custom sort. It should only the children nodes. In simple words. All the parent nodes should be fixed, and only the child nodes have to be sorted.
Updated USECASE
Two elements having same parents and those two elements has no child nodes then I used DefaultItemSorter.compare(). And I ignored all other use cases.