Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Text Filter column doesn't work
Text Filter column doesn't work [message #1764816] Fri, 02 June 2017 12:01 Go to next message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
Hello,

I am using Nattable 1.3, when i enter a word in the column filter text field, the filter work but if i enter two words for exmaple "Abc defg" , it doesn't find the matching rows.

Other thing, if i have numeric column, >, < operator doesn't work, i should enter >= or <= to get it work.

I planning to migrate from 1.3 to 1.5 version of nattable, would you like to guide me

Thanks in advance.
Re: Text Filter column doesn't work [message #1764820 is a reply to message #1764816] Fri, 02 June 2017 12:33 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I don't know what to guide. Simply update. If you didn't override internal API this should simply work.

If you want to use expressions like < and > operator you need to register the configuration attribute FilterRowConfigAttributes.TEXT_MATCHING_MODE with value TextMatchingMode.REGULAR_EXPRESSION. Check the GlazedListsFilterExample where this is shown for the housenumber column.

And regarding the two words ... do you expect that it is searched for both words somewhere in the text or do you expect that they come exactly the way you typed them. I mean, do you want to find rows that contain "Abc defg" or do you search rows that simply contain both values somewhere? The later is not working that way. You need to specify the two words separated with a & to make a search for "CONTAINS 1 AND 2"
Re: Text Filter column doesn't work [message #1764822 is a reply to message #1764820] Fri, 02 June 2017 12:51 Go to previous messageGo to next message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
Many thanks for your quick reply, i want to retrieve rows that contains or equal exactly the value "Abc defg"
Re: Text Filter column doesn't work [message #1764835 is a reply to message #1764822] Fri, 02 June 2017 14:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
If you want to have both you need to use th & operator as explained. At least it works with my current workspace which is 1.5+
Re: Text Filter column doesn't work [message #1764841 is a reply to message #1764835] Fri, 02 June 2017 14:55 Go to previous messageGo to next message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
I would to get all rows that contains "abc defg" not contains "abc" or "defg", so : Row that have for example "xxxxabc defg xxxx" should match but row that conatains: "xxxx defg xxxx" or "xxxx abc xxxx"shouldn't match.

if i use & delimiter like this: "abc & defg", rows that have only "abc" and rows that have only "defg" will match the filter.
Re: Text Filter column doesn't work [message #1764845 is a reply to message #1764841] Fri, 02 June 2017 15:04 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Then I have no idea what your issue is. It should already work that way.
Re: Text Filter column doesn't work [message #1764849 is a reply to message #1764845] Fri, 02 June 2017 15:13 Go to previous messageGo to next message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
when i enter Abc defg the filter doen't work
Re: Text Filter column doesn't work [message #1764853 is a reply to message #1764849] Fri, 02 June 2017 15:27 Go to previous message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
the problem was in my delimiter, it was "et" and in my data i have string value that contains the substring "et", when i changed the delimiter to && it works fine

[Updated on: Fri, 02 June 2017 15:52]

Report message to a moderator

Previous Topic:setDataValue of ColumnPropertyAccessor not called when using TableCellEditor
Next Topic: Nattable Export Excel Report contains filter string also
Goto Forum:
  


Current Time: Thu Apr 25 08:58:33 GMT 2024

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

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

Back to the top