444546474849505152
} public void reset(){ if(selectedAirport != null) log.debug("airport before reset : " + selectedAirport.toString()); selectedAirport = new Airport(); if(selectedAirport != null) log.debug("airport after reset : " + selectedAirport.toString()); }
1920212223242526
@Override public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) { if (arg2 == null || arg2.equals("")) return null; Long id = Long.valueOf(arg2); Airport airport = em.find(Airport.class, id); return airport; }
272829303132333435
@Override public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) { if (!(arg2 instanceof Airport)) return ""; Airport airport = (Airport) arg2; Long id = airport.getId(); return String.valueOf(id); }