public void submit() { Long selectedDepartingFlightId = sharedAirSearchCriteria.getSelectedDepartingFlightId(); Long selectedReturnFlightId = sharedAirSearchCriteria.getSelectedReturnFlightId(); FlightDetail departingFlight = airBookManager.findFlightByAvailableFlight(selectedDepartingFlightId); FlightDetail returnFlight = airBookManager.findFlightByAvailableFlight(selectedReturnFlightId); UniversalRecord book = airBookManager.book( departingFlight, returnFlight, airBookManager.getInializedPassengerDetailInstance(), airBookManager.getInializedFormOfPaymentInstance()); sharedAirSearchCriteria.setUniversalRecordId(book.getId()); Logger.getLogger(AirSearchBean.class.getName()) .log(Level.INFO, "fop: {0} passenger", new String[] {fop.toString(), passenger.toString()}); UIUtils.pause(1); UIUtils.ajaxRedirect("/AirBookSuccess.jsf"); }
@PostConstruct public void init() { fop = airBookManager.getInializedFormOfPaymentInstance(); passenger = airBookManager.getInializedPassengerDetailInstance(); }