Skip to main content



      Home
Home » Newcomers » Newcomers » Nebula NatTable Integer column Sorting(Registering custom comparator for integer column sorting does not work)
Nebula NatTable Integer column Sorting [message #1852071] Thu, 28 April 2022 06:54 Go to next message
Eclipse UserFriend
Hello all,

I am trying to sort a column in the NatTable which has numeric values. Since the default data type for column values is String, default sorting happens in this column by string comparison. To make this column sorted by numeric values i registered custom comparator like this:

configRegistry.registerConfigAttribute(SortConfigAttributes.SORT_COMPARATOR, new MyCustomComparator(), DisplayMode.NORMAL, ColumnLabelAccumulator.COLUMN_LABEL_PREFIX + intColIndex);

MyCustomComparator implements comparator using integer comparison

This registration of comparator does not do anything and the column sorts on string comparison instead of integer comparison.

Is there anything else i should do?
Any help, will be greatly appreciated.

Thanks in Advance

Regards
Teja
Re: Nebula NatTable Integer column Sorting [message #1852087 is a reply to message #1852071] Thu, 28 April 2022 12:04 Go to previous messageGo to next message
Eclipse UserFriend
It's better to ask here:

https://www.eclipse.org/forums/index.php?t=thread&frm_id=240
Re: Nebula NatTable Integer column Sorting [message #1852097 is a reply to message #1852087] Fri, 29 April 2022 00:11 Go to previous message
Eclipse UserFriend
Thanks for the info Ed Merks!
Previous Topic:Jersey BodyPartEntity issue
Next Topic:Client <unknown> disconnected: Unknown error.
Goto Forum:
  


Current Time: Thu Jul 17 11:13:03 EDT 2025

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

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

Back to the top