ColumnComparatorContextProvider and GroupTables

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

ColumnComparatorContextProvider and GroupTables

Postby nad » Mon Jul 27, 2015 8:02 am

I'm currently using a group table and would like to set the ColumnComparatorContextProvider. When I set it as below:

defaultGroupTableModel.setColumnComparatorContextProvider(new DefaultGroupTableModel.ColumnComparatorContextProvider() {
@Override
public ComparatorContext getColumnComparatorContext(
TableModel tableModel, int column) {
//Some code to determine if its the correct column / comparator context
}
});

The comparator is returned properly when sorting by a grouped column. For example, if I have my method return my comparator for column 5 ,group by column 5, and then sort by column 5, I see my comparator returned and sort correctly.

When I sort by an ungrouped column, I do not see this method being called in the debugger. Is there another method I should be using?

Thank you,
Nick
nad
 
Posts: 27
Joined: Wed Jul 25, 2012 7:55 am

Re: ColumnComparatorContextProvider and GroupTables

Postby JIDE Support » Mon Jul 27, 2015 10:17 am

We may not call it again if it has been called once as we will cache it internally. Is the correct ComparatorContext used although it was not being called again?
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 11 guests

cron