• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with sorting date column with null values in a dataTable  RSS feed

vishnu bola
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a dataTable in which columns are sorted using h:commandLink. Sorting works fine when all the values in the column are populated. But the problem comes in only when some of the column values are null. Here is my code:

Even when some lastname column values are null sorting works fine and all the null values come at the end when sorted in ASC and on top when sorted in DSC but only when some dates in the start date column are null it gives me NPE. Can someone help me how to handle null date values in this sorting method.

Thank You
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!