Skip to main content



      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 03:27 Go to next message
Eclipse UserFriend
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 214 times)
Re: Filter Not working when column cell value contains "*" [message #1800662 is a reply to message #1800636] Fri, 04 January 2019 13:00 Go to previous messageGo to next message
Eclipse UserFriend
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 01:18 Go to previous messageGo to next message
Eclipse UserFriend
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 02:58 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Filter Not working when column cell value contains "*" [message #1841316 is a reply to message #1800717] Wed, 12 May 2021 01:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

We are also facing the same issue, we are using NAT Table version 1.1. But when I tried with NAT table example (Version 1.6) it is working. So I believe it is fixed in latest version.

I just want to know, From which version it is fixed ?
Re: Filter Not working when column cell value contains "*" [message #1841322 is a reply to message #1841316] Wed, 12 May 2021 04:36 Go to previous messageGo to next message
Eclipse UserFriend
NatTable 1.1 was released in 2014. The current version is 2.0.

You are asking for some details on when some specific issue was fixed within the last 7 years.

Sorry but I really can't remember such details over 7 years of development. If you need that information you can inspect the repository history. Or you can check the closed tickets in Bugzilla.
Re: Filter Not working when column cell value contains "*" [message #1841363 is a reply to message #1841322] Thu, 13 May 2021 03:04 Go to previous message
Eclipse UserFriend
Okay. Thanks !!!

I will check in Bugzilla and in repository history.
Previous Topic:ComboBoxCellEditor events on mac
Next Topic:Table cell is moving after Return
Goto Forum:
  


Current Time: Fri May 23 04:47:44 EDT 2025

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

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

Back to the top