Table Column sorting order asc/desc

Hey Everyone,

I am trying to findout if there is a way to find-out if a column is asc or desc sorted without having to exted the Table class?

Is there an attribute?



if the sort is done within the table (only one column sorted) you can call com.vaadin.ui.Table.isSortAscending(). If you have sorted by multiple columns from code, there is no way to get this information from the Table.

In the latter case, if you’re using Indexed/Hierarchical/Bean/BeanItemContainer, you can set your own ItemSorter to them. You can just extend the DefaultItemSorter and store the sort properties when they are set, and add a method to retrieve this information.