Skip to main content



      Home
Home » Eclipse Projects » NatTable » Filter column values using custom FILTER_DISPLAY_CONVERTER
Filter column values using custom FILTER_DISPLAY_CONVERTER [message #1805186] Tue, 09 April 2019 09:40 Go to next message
Eclipse UserFriend
I'm trying to use FILTER_DISPLAY_CONVERTER to filter values using custom DisplayConverter impelmentation. Problem which I have is that when I use DefaultGlazedListsFilterStrategy for filtering, it uses DisplayConverter to get value from the filter cell(user entered data to filter).
Issue here is that this cell contains String Object and not Object which is expected for this column. And when DefaultGlazedListsFilterStrategy tries to get value from filter cell using provided DisplayConverter it fails, as this value is always of type String.
And as result this line of code:
"String filterText = getStringFromColumnObject(columnIndex, mapEntry.getValue();" always returns empty String.
Re: Filter column values using custom FILTER_DISPLAY_CONVERTER [message #1805379 is a reply to message #1805186] Fri, 12 April 2019 16:09 Go to previous messageGo to next message
Eclipse UserFriend
Sorry but I don't understand what your problem is. Did you have a look at our examples? I'm pretty sure we have an example showing the usage.
Re: Filter column values using custom FILTER_DISPLAY_CONVERTER [message #1805802 is a reply to message #1805379] Wed, 24 April 2019 08:23 Go to previous messageGo to next message
Eclipse UserFriend
Yes, I checked provided examples.
Question is not how to use Filters or DisplayConverter, in my previous message I wanted to explain what is a problem in existing implementation of DefaultGlazedListsFilterStrategy .
I will try to simplify it: In case when user enters data for filtering it is always String, or am I wrong?
But when DefaultGlazedListsFilterStrategy is used for filtering, it applies DisplayConverter(could be custom one) for the entered value(which is always String).
Thereby passes String object to DisplayConverter, which was expecting to be custom user type and not String.
Re: Filter column values using custom FILTER_DISPLAY_CONVERTER [message #1805819 is a reply to message #1805802] Wed, 24 April 2019 14:52 Go to previous message
Eclipse UserFriend
I still don't understand your problem. Please have a look at the _6032_GlazedListsFilterCustomTypesExample. There you can see that the same converter is registered as FILTER_DISPLAY_CONVERTER and DISPLAY_CONVERTER in the filter row and the body. The DefaultGlazedListsFilterStrategy compares the string representations. So IMHO everything works as intended.
Previous Topic:Display loading state in table
Next Topic:Filtering combo box filtering
Goto Forum:
  


Current Time: Fri May 23 02:12:10 EDT 2025

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

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

Back to the top