1

In primefaces 6.1 we are using DataTableFeatureKey like below:

static Map<DataTableFeatureKey, DataTableFeature> FEATURES;

static {
    FEATURES = new HashMap<DataTableFeatureKey, DataTableFeature>();
    FEATURES.put(DataTableFeatureKey.FILTER, new ScwFilterFeature());
    FEATURES.put(DataTableFeatureKey.PAGE, new PageFeature());
    FEATURES.put(DataTableFeatureKey.SORT, new SortFeature());
    FEATURES.put(DataTableFeatureKey.RESIZABLE_COLUMNS, new ResizableColumnsFeature());
    FEATURES.put(DataTableFeatureKey.SELECT, new SelectionFeature());
    FEATURES.put(DataTableFeatureKey.ROW_EDIT, new RowEditFeature());
    FEATURES.put(DataTableFeatureKey.CELL_EDIT, new CellEditFeature());
    FEATURES.put(DataTableFeatureKey.ROW_EXPAND, new RowExpandFeature());
    FEATURES.put(DataTableFeatureKey.SCROLL, new ScrollFeature());
    FEATURES.put(DataTableFeatureKey.DRAGGABLE_ROWS, new DraggableRowsFeature());
}

We want to migrate to primefaces 11 and DataTableFeatureKey is removed.

How can we replace above code to make it compatible with primefaces 11?

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
Abhishek
  • 156
  • 1
  • 10

1 Answers1

1

Short Answer is you cannot for PF11. See: https://github.com/primefaces/primefaces/issues/8061

It was removed "in the past it was replaceable BUT not by design" it was internal to the datatable.

However in 13.0.0 you will be able to replace them again: https://github.com/primefaces/primefaces/pull/9803/files

Melloware
  • 10,435
  • 2
  • 32
  • 62