Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Tree Example With the Filter Problem(Tree With the Filter Problem)
Tree Example With the Filter Problem [message #1706981] Tue, 01 September 2015 10:06 Go to next message
Shashi Mising name is currently offline Shashi Mising nameFriend
Messages: 47
Registered: August 2011
Hello All,

The issue is that the glazedListsEventLayer is not able to listen for layer for event handling of inputList and PropertyChanges.


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(),

// 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>(

ITreeRowModel<Object> treeRowModel = new GlazedListTreeRowModel<Object>(

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);


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


[Updated on: Tue, 01 September 2015 10:07]

Report message to a moderator

Re: Tree Example With the Filter Problem [message #1707006 is a reply to message #1706981] Tue, 01 September 2015 12:51 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
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.
Previous Topic:Custom cell painter example bugs
Next Topic:Nattable column and row resize behaviour
Goto Forum:

Current Time: Sat Mar 06 16:44:35 GMT 2021

Powered by FUDForum. Page generated in 0.02153 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top