aspose file tools*
The moose likes JSF and the fly likes Customize Sortling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Reply locked New topic
Author

Customize Sortling

akhtar qureshi
Greenhorn

Joined: Nov 24, 2009
Posts: 16
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

Joined: Apr 06, 2010
Posts: 4366
    
    8

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Customize Sortling