cancel
Showing results for 
Search instead for 
Did you mean: 

TableSorter.java doesn't handle columns with null values

Former Member
0 Kudos

Hello,

I'm applying the TableSorter.java class to my table columns for sorting as/descending.

The functionality I'm trying to achieve is to sort all values that equal null to the top of the table.

Is there a way to do this?? Currently the code exits out at this line:


if (elementComparator == null)
{ //not a sortable column 
	column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE); 
	return; // exits out here
}

How can I tackle this??

EDIT

I just put in values into the entire column, but its still throwing a null pointer exception?

/EDIT

Thanks

M

PS. My sortable table column doesn't appear with the Sort By Ascending / Descending icon, it just has a pointer hand on hover....how can I have the icon please?

Edited by: Marshall Mathers on Apr 30, 2009 1:04 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sort works now, I had downloaded the TableSorter.java file from the code snippets area in the wiki which has bugs.