1 17 package org.alfresco.web.ui.common; 18 19 import javax.faces.model.SelectItem; 20 21 26 public final class SortableSelectItem extends SelectItem implements Comparable  27 { 28 public SortableSelectItem(String value, String label, String sort) 29 { 30 super(value, label); 31 this.sort = sort; 32 } 33 34 public int compareTo(Object obj2) 35 { 36 if (this.sort == null && obj2 == null) return 0; 37 if (this.sort == null) return -1; 38 if (obj2 == null) return 1; 39 return this.sort.compareToIgnoreCase( ((SortableSelectItem)obj2).sort ); 40 } 41 42 private String sort; 43 } 44 | Popular Tags |