public Equipment getSelected() { if (current == null) { current = new Equipment(); current.setEquipmentPK(new EntityDB.EquipmentPK()); selectedItemIndex = -1; } return current; }
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()); } }
public String prepareCreate() { current = new Equipment(); current.setEquipmentPK(new EntityDB.EquipmentPK()); selectedItemIndex = -1; return "Create"; }