Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Filter Not working when column cell value contains "*"(If filter is applied on my Nattable column, if that column has a value which contains "*" in it at any position, then filter does not work correctly.)
Filter Not working when column cell value contains "*" [message #1800636] Fri, 04 January 2019 08:27 Go to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 9
Registered: March 2017
Junior Member
I am using Nattable filter functionality, some of my values in column cell contains string with "*" in it. on apply of filter if i select any value in filter drop-down the rows are not getting filtered correctly.


this is my code to apply filter
ComboBoxFilterRowHeaderComposite<FVESIGFSConnectorData> filter = ((FVESINatTableGFSGridLayer<FVESIGFSConnectorData>) (getNatComposite()
.getNatTableBuilder().getGridlayer())).getFilterRowHeaderLayer();

filter.setFilterRowVisible(false);
filter.setAllValuesSelected();

  • Attachment: Capture1.PNG
    (Size: 3.87KB, Downloaded 87 times)
Re: Filter Not working when column cell value contains "*" [message #1800662 is a reply to message #1800636] Fri, 04 January 2019 18:00 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
You are using the ComboBoxFilterRowHeaderComposite which by default uses the TextMatchingMode.REGULAR_EXPRESSION. The asterisk is a special character with regards to regular expressions. So I suppose that is the reason for the behavior.

I actually don't understand your code. Why do you set the filter row invisible and select all values as selected? And why do you expect that something gets filtered even you have actually no filter applied?
Re: Filter Not working when column cell value contains "*" [message #1800714 is a reply to message #1800662] Mon, 07 January 2019 06:18 Go to previous messageGo to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 9
Registered: March 2017
Junior Member
Actually as per myrequirement, the filter row is only visible on a toggle action. and when the toggle is yes, the filter row should be visible with all filter values as selected and then user can drill down by unchecking non required values from the filter combo.

Do u have any sample where i can bypass the "*" behavior and make it work like any other character.
Re: Filter Not working when column cell value contains "*" [message #1800717 is a reply to message #1800714] Mon, 07 January 2019 07:58 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2702
Registered: July 2012
Senior Member
Unfortunately not. But actually I wonder why it is not working. If I try something similar in the ExcelLikeFilterRowExample by editing some values with adding asterisks, it seems to work like it should. Maybe you want to test here and compare with your implementation.

In ComboBoxGlazedListsFilterStrategy#getStringFromColumnObject() the selected values from the combo boxes are quoted. This way special characters like asterisks should be treated as any other character. Therefore I don't understand why it is not working in your environment. Maybe you need to debug to see how the filter expression looks like in your error case.
Previous Topic:Problem with Column Group Reorder and Column Grouping by Value
Next Topic:Dynamically set column span for a cell
Goto Forum:
  


Current Time: Sun Aug 18 23:16:41 GMT 2019

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

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

Back to the top