This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with sorting date column with null values in a dataTable

 
vishnu bola
Ranch Hand
Posts: 35
  • 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
 
Message for you sir! I think it is a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!