nattable combobox filter header with group by

时间:2016-11-27 06:53:36

标签: nattable

我正在尝试使用“ComboBoxFilterRowHeaderComposite”实现nattable。

过滤工作正常但在我尝试按分组过滤行后,它会抛出异常

filterRowHeaderLayer = new ComboBoxFilterRowHeaderComposite<T>( bodyLayerStack.getFilterList(), bodyLayerStack.getGlazedListsEventLayer(), bodyLayerStack.getSortedList(), columnAccessor, columnHeaderLayer, dataProvider, configRegistry);

这是我的ComboBoxFilterRowHeaderComposite结构:

CornerLayerStack cornerLayerStack = new CornerLayerStack(rowHeaderLayerStack, filterRowHeaderLayer);

其中,

columnAccessor = new ReflectiveColumnPropertyAccessor(propertyNames);

columnGroupHeaderLayer = new DynamicColumnGroupHeaderLayer(sortHeaderLayerStack,bodyLayerStack.getSelectionLayer(),                 bodyLayerStack.getColumnGroupModel(),tr);

DataProvider是com.vanguard.tip.epm.platform.ui.grid.next.DynamicColumnHeaderDataProvider;

之后

CompositeLayer gridLayer = new GridLayer(bodyLayerStack, filterRowHeaderLayer, rowHeaderLayerStack, cornerLayerStack);

groupByHeaderLayer = new GroupByHeaderLayer(bodyLayerStack.getGroupByModel(), gridLayer, columnHeaderLayerStack.getDataProvider(), new GroupByHeaderConfigurationWrapper(bodyLayerStack.getGroupByModel(), columnHeaderLayerStack.getDataProvider(), bodyLayerStack.getColumnGroupModel()));

然后在GroupByHeaderLayer中添加gridLayer:

CompositeLayer groupByComposite = new CompositeLayer(1, 2);

groupByComposite.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION, groupByHeaderLayer, 0, 0);

groupByComposite.setChildLayer("Grid", gridLayer, 0, 1);

filterStrategy = new DefaultGlazedListsFilterStrategy<T>(bodyLayerStack.getFilterList(), columnAccessor, configRegistry);

我希望这能让你清楚地了解我对Nattable的使用。

当我使用具有相同结构的文本库过滤器时,分组工作正常:

this.filterRowHeaderLayer = new FilterRowHeaderComposite<T>(filterStrategy, columnHeaderLayer, dataProvider, configRegistry);

{{1}}

如果您需要更多信息,请与我们联系。

1 个答案:

答案 0 :(得分:0)

似乎是该组合的错误。我为此创建了以下票证:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=508334