Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Greater than (>) does not work at filter using regular expression?
Greater than (>) does not work at filter using regular expression? [message #1000896] Tue, 15 January 2013 16:38 Go to next message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
Member
I have an integer in a column and I want to filter it with the options greater than less than etc. I found out that I could do that with the:

configRegistry.registerConfigAttribute(
	FilterRowConfigAttributes.TEXT_MATCHING_MODE,
	TextMatchingMode.REGULAR_EXPRESSION,
	DisplayMode.NORMAL,
	FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 6);


If I do that, the less than (<), less than or equals (<=), greater than or equals (>=) works, but the greater than (>) does not work.

After some investigation I found out that in the examples this also does not work!!!
I am using NatTable version 0.9.0.
And Glazedlists 1.8.0 (java15).

I followed the code and it looks like the correct matcher is build: ThresholdMatcherEditor with the correct match operation: ThresholdMatcherEditor.GREATER_THAN
So maybe it is a problem at glazedlist.

I could not find a bug report on it.

Does anybody know what the problem is?
And how I can fix it?

[Updated on: Tue, 15 January 2013 16:46]

Report message to a moderator

Re: Greater than (>) does not work at filter using regular expression? [message #1001186 is a reply to message #1000896] Wed, 16 January 2013 08:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

I also don't see why greater than isn't working. I posted to the GlazedLists mailing list for this.

http://glazedlists.1045722.n5.nabble.com/Greater-than-filter-not-working-td5709816.html

I know we had a fixed ThreasholdMatcherEditor because of some issues in NatTable. But because of IP review we needed to remove it from NatTable. It is of course correct that we remove such code. In terms of both, intellectual property and the ability to update without any issues. I'm also not sure if this fixed the greater than issue back in the days. That was long before I joined the NatTable team.

So hopefully some GlazedLists developers will answer on that soon.

Greez,
Dirk
Re: Greater than (>) does not work at filter using regular expression? [message #1001249 is a reply to message #1001186] Wed, 16 January 2013 10:20 Go to previous messageGo to next message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
Member
Hi Dirk,

Thanks for looking into it and helping to fix the problem.

I tried to use the latest glazedlist build (glazedlists_java15-1.9-20111127.203634-11) i could find, but it didn't help.

I could also try to check out SVN and build it myself, but I would rather not (because I would like to use a stable build). Did you try this? And if so, did it help?

Do you have other suggestions for workarounds?
Re: Greater than (>) does not work at filter using regular expression? [message #1001279 is a reply to message #1001249] Wed, 16 January 2013 11:39 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

I checked against NatTable 2.3.2 version, which was the last version hosted on SourceForge. There we had a fixed version of the ThresholdMatcherEditor. Running the NatTable examples based on 2.3.2 the greater than is working. So I assume that in NatTable we had fixed the issue temporarily.

The only thing you can do at the moment is to get the ThresholdMatcherEditor from the NatTable 2.3.2 at Sourceforge, and rewrite the NatTable code (unfortunately this means copy paste our code) by changing the ThresholdMatcherEditor from GlazedLists to the custom one. As I still don't understand the issue in detail, there is nothing else I can tell you.

I will tell the guys from GlazedLists about this, and hopefully they are able to fix this for the upcoming 1.9 release.
Re: Greater than (>) does not work at filter using regular expression? [message #1001295 is a reply to message #1001279] Wed, 16 January 2013 12:17 Go to previous messageGo to next message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
Member
Thanks for checking that out, I will try that and let you know if that works. Hopefully glazedlists will have a solution for this soon.
Re: Greater than (>) does not work at filter using regular expression? [message #1001334 is a reply to message #1001295] Wed, 16 January 2013 14:07 Go to previous messageGo to next message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
Member
It works!!!

I used the ThresholdMatcherEditor from version 2.3.2. I copied the DefaultGlazedListsFilterStrategy to create CustomGlazedListsFilterStrategy and I copied the method setMatchOperation from FilterRowOptions to CustomGlazedListsFilterStrategy (otherwise it would use the wrong ThresholdMatcherEditor) and now it works.

I hope they have a fix at glazedlist soon, so I can remove this workaround.
Re: Greater than (>) does not work at filter using regular expression? [message #1001847 is a reply to message #1001334] Thu, 17 January 2013 12:53 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi Renso,

we got feedback from the GlazedLists guys. See the answer on the dev list http://glazedlists.1045722.n5.nabble.com/Greater-than-filter-not-working-td5709816.html.

As you had a running example for the GlazedLists 1.9 developer preview snapshot, could you please test the greater than test cases with that? Would be a great help.

Greez, Dirk

Re: Greater than (>) does not work at filter using regular expression? [message #1001901 is a reply to message #1001847] Thu, 17 January 2013 14:31 Go to previous message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
Member
Hi Dirk,

Greater than works with the latest snapshot! (glazedlists_java15-1.9-20130116.203303-12.jar)
For me, I rather use the CustomThresholdMatcherEditor I copied from 2.3.2. than working with a snapshot version.

But after the glazedlists guys release 1.9 I will use that version.
Previous Topic:Filter Row - set row height
Next Topic:Filter multiple items in a dropdown.
Goto Forum:
  


Current Time: Fri Mar 29 15:42:37 GMT 2024

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

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

Back to the top