I'm using 11.1.1.6 Jdev.
I have a <af:table> with a column, which is Number type but most of them with NULL value.
I try to create a custom sort on this column: NULL always at the bottom no matter it's ascending or descending. But I could not get it work.
Can anyone show me how to implement onSort the above logic?
Thank you
public void onSort(SortEvent sortEvent) {
List currentSortList = sortEvent.getSortCriteria();
SortCriterion sortCriterion = (SortCriterion)currentSortList.get(0);
List<SortCriterion> tableSortList = new ArrayList<SortCriterion>();
SortCriterion sortCriterionReplaced = new SortCriterion(sortCriterion.getProperty(), sortCriterion.isAscending());
tableSortList.add(sortCriterionReplaced);
RichTable richTable = (RichTable)sortEvent.getComponent();
richTable.setSortCriteria(tableSortList);
//refresh table
AdfFacesContext.getCurrentInstance().addPartialTarget(richTable);
}