Beispiel #1
0
 public Equipment getSelected() {
   if (current == null) {
     current = new Equipment();
     current.setEquipmentPK(new EntityDB.EquipmentPK());
     selectedItemIndex = -1;
   }
   return current;
 }
Beispiel #2
0
 public String getAsString(FacesContext facesContext, UIComponent component, Object object) {
   if (object == null) {
     return null;
   }
   if (object instanceof Equipment) {
     Equipment o = (Equipment) object;
     return getStringKey(o.getEquipmentPK());
   } else {
     throw new IllegalArgumentException(
         "object "
             + object
             + " is of type "
             + object.getClass().getName()
             + "; expected type: "
             + EquipmentController.class.getName());
   }
 }
Beispiel #3
0
 public String prepareCreate() {
   current = new Equipment();
   current.setEquipmentPK(new EntityDB.EquipmentPK());
   selectedItemIndex = -1;
   return "Create";
 }