hihi all,
is this currently, the best way to reset a table's sorting/pagination state?
for(UIComponent column : myTable.getChildren()) {
((UIColumn)column).setSortOrder(Ordering.UNSORTED);
}
myTable.getAttributes().put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, new Integer(1));
i have a dataTable that is being populated with different source data and noticed the side-effect of "sticky" sort and pagination state. that is, whenever i change the table to display new data, the sort/pagination should be reset and not "inherit" the sort/pagination from before.
the reason i'm asking is just to make sure what i'm doing is correct and necessary, or perhaps there is a simpler/better/more elegant way to do this?
thanks in advance,
-v