3 Replies Latest reply on May 13, 2008 12:09 PM by Konstantin Mishin

    How to find out which columns are sorted and filtered in sub

    Alex Baranov Newbie

      Hello, I was trying to implement "lazy" datatable with pagination. Everything was clear enough until I decided to make the table sortable. I'd like to know in my class derived from ExtendedDataModel which columns did user select to sort and/or filter the table.

      I've investigate through the richfaces source for a while.
      It would be nice to have getFilterFields() and getSortFields() methods in ExtendedDataModel class. ExtendedDataModel instance can be initialized with this data in the end of the next method:

      public abstract class UIDataTable extends SequenceDataAdaptor implements Sortable2, Filterable {
       protected ExtendedDataModel createDataModel() {
       ExtendedDataModel dataModel = super.createDataModel();
       // INITIALIZE dataModel HERE
       return new ModifiableModel(dataModel, getVar(), getFilterFields(), getSortFields());

      Thanx in advance