super.processUpdates(context);
updateSheetState(context);
}
private void updateSheetState(FacesContext facesContext) {
SheetState state = getSheetState(facesContext);
if (state != null) {
// ensure sortActionListener
// getSortActionListener();
// state.setSortedColumn(sortActionListener != null ? sortActionListener.getColumn() : -1);
// state.setAscending(sortActionListener != null && sortActionListener.isAscending());
Map attributes = getAttributes();
//noinspection unchecked
state.setSelectedRows((List<Integer>) attributes.get(ATTR_SELECTED_LIST_STRING));
state.setColumnWidths((String) attributes.get(ATTR_WIDTH_LIST_STRING));
state.setScrollPosition((Integer[]) attributes.get(ATTR_SCROLL_POSITION));
attributes.remove(ATTR_SELECTED_LIST_STRING);
attributes.remove(ATTR_SCROLL_POSITION);
}
}