Tree Example With the Filter Problem [message #1706981] |
Tue, 01 September 2015 06:06  |
Eclipse User |
|
|
|
Hello All,
The issue is that the glazedListsEventLayer is not able to listen for layer for event handling of inputList and PropertyChanges.
Implementation:
I implemented a code that the table should support both Tree and filter functionality and my code is as below.
Step :1
// I created the sorted list, filter list and treeList as below.
FilterList<Object> filterList = new FilterList<Object>(sortedList);
TreeList<Object> treeList = new TreeList<Object>(filterList,
new SCATableTreeFormat(), TreeList.nodesStartCollapsed());
// build the filter strategy to filter the table data
DefaultGlazedListsFilterStrategy<Object> filterStrategy = new DefaultGlazedListsFilterStrategy<Object>(
filterList, bodyLayerStack.getColumnPropertyAccessor(),
configRegistry);
// The column header layer is wrapped in a filter row composite.
FilterRowHeaderComposite<Object> filterRowHeaderLayer = new FilterRowHeaderComposite<Object>(
filterStrategy, sortHeaderLayer,
columnHeaderDataProvider, configRegistry);
Step 2:
//created the column Accessor and data provider and data layer.
IColumnPropertyAccessor<Object> columnPropertyAccessor = new ColumnAccessor();
IRowDataProvider<Object> bodyDataProvider = new MyListDataProvider();
DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
Step 3:
//created GlazedListsEventLayer layer for event handling of inputList and PropertyChanges
GlazedListsEventLayer<Object> glazedListsEventLayer = new GlazedListsEventLayer<Object>(
bodyDataLayer, treeList);
Step 4:
//created the treeData and Tree model
GlazedListTreeData<Object> treeData = new GlazedListTreeData<Object>(
treeList);
ITreeRowModel<Object> treeRowModel = new GlazedListTreeRowModel<Object>(
treeData);
final ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(bodyDataLayer, false);
final ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(columnReorderLayer);
SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
TreeLayer treeLayer = new TreeLayer(this.selectionLayer, treeRowModel);
ViewportLayer viewportLayer = new ViewportLayer(treeLayer);
setUnderlyingLayer(viewportLayer);
I used some data converter for filter but it is not working as because GlazedListsEventLayer is not able to listen the filter apply changes and not providing the output as expected.
I am not understanding whether i configure it in wrong way or still any configuration required to make it work.
Thank you
regards
Shashi
[Updated on: Tue, 01 September 2015 06:07] by Moderator
|
|
|
Re: Tree Example With the Filter Problem [message #1707006 is a reply to message #1706981] |
Tue, 01 September 2015 08:51  |
Eclipse User |
|
|
|
IIRC you simply need to create the GlazedListsEventLayer using the filterList instead of the treeList.
There are several examples in our NatTable Examples Application in the Integration section that show that it works well and give you hints on how to setup.
|
|
|
Powered by
FUDForum. Page generated in 0.04092 seconds