This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

Customize Sortling

 
akhtar qureshi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello,

I want to develop one sorting demo for car list. i am using data table to display car list (JSF datatable). Now actually i want to sort the list by car color. here it is not sort by alphabetic order. I want to use my custom order list like Red car come first, then Blue, etc.

For that i try to use Java Comparator and comparable but its allow to sort in alphabetic order only.

So, can any one guide me the way to implement and technique to use that wise the sorting became faster.


Thank you for your time,
Akhta
 
Matthew Brown
Bartender
Posts: 4565
8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post your questions in multiple forums. This is identical to your question here, and that's a more appropriate forum as it isn't really anything to do with JSF.
 
    Bookmark Topic Watch Topic
  • New Topic