1 13 14 package org.ejbca.ui.web.admin.configuration; 15 16 import javax.faces.model.SelectItem; 17 18 28 29 public class SortableSelectItem extends SelectItem implements Comparable { 30 31 public SortableSelectItem(Object arg0, String arg1, String arg2, boolean arg3) { 32 super(arg0, arg1, arg2, arg3); 33 } 34 35 public SortableSelectItem(Object arg0, String arg1, String arg2) { 36 super(arg0, arg1, arg2); 37 } 38 39 public SortableSelectItem(Object arg0, String arg1) { 40 super(arg0, arg1); 41 } 42 43 public int compareTo(Object arg0) { 44 int retval = 0; 45 if(arg0 instanceof SelectItem){ 46 return this.getLabel().compareTo(((SelectItem) arg0).getLabel()); 47 } 48 return retval; 49 } 50 51 } 52 | Popular Tags |