1 16 import javax.faces.model.SelectItem; 17 import javax.faces.model.SelectItemGroup; 18 19 import java.util.*; 20 24 public class Items { 25 private List equipments = null; 26 27 28 public Items() { 29 equipments = new ArrayList(); 30 31 SelectItemGroup first = new SelectItemGroup("braking"); 32 SelectItemGroup second = new SelectItemGroup("equipment"); 33 34 SelectItem[] array1 = {new SelectItem("abs"), new SelectItem("esp")}; 35 SelectItem[] array2 = {new SelectItem("radio"), new SelectItem("gps"), new SelectItem("mobil set")}; 36 37 first.setSelectItems(array1); 38 second.setSelectItems(array2); 39 40 equipments.add(first); 41 equipments.add(second); 42 } 43 44 public List getEquipments() { 45 return equipments; 46 } 47 48 public void setEquipments(List equipments) { 49 this.equipments = equipments; 50 } 51 52 } 53 | Popular Tags |