Package frwa

Examples of frwa.ActionResult


        List<Flight> flights = factory.getFlightDAO().searchForFlightsFromAirport(FlightsFrom);
        for (Flight flight: flights) {
            flight.setDepartureAirport(factory.getAirportDAO().loadCountryName(flight.getDepartureAirport()));
            flight.setDestinationAirport(factory.getAirportDAO().loadCountryName(flight.getDestinationAirport()));
        }
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/ShowFlightsInformation.jsp");
        if (flights!=null) {
            actionResult.setUrlAddress("/flt/ShowFlightsInformation.jsp");
        } else {
            actionResult.setUrlAddress("flt/FlightNotFound.jsp");
        }
        FlightsFormObject flightsFormObject = new FlightsFormObject();
        flightsFormObject.setFlights(flights);
        actionResult.setFormObject(flightsFormObject);
        return actionResult;
    }
View Full Code Here


        List<Flight> flights = factory.getFlightDAO().searchForFlightsToAirport(FlightsTo);
        for (Flight flight: flights) {
            flight.setDepartureAirport(factory.getAirportDAO().loadCountryName(flight.getDepartureAirport()));
            flight.setDestinationAirport(factory.getAirportDAO().loadCountryName(flight.getDestinationAirport()));
        }
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/ShowFlightsInformation.jsp");
        if (flights!=null) {
            actionResult.setUrlAddress("/flt/ShowFlightsInformation.jsp");
        } else {
            actionResult.setUrlAddress("flt/FlightNotFound.jsp");
        }
        FlightsFormObject flightsFormObject = new FlightsFormObject();
        flightsFormObject.setFlights(flights);
        actionResult.setFormObject(flightsFormObject);
        return actionResult;
    }
View Full Code Here

    public String getName() {
        return "MainAirport";
    }

    public ActionResult perform(HttpServletRequest request) {
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/MainAirport.jsp");
        actionResult.setFormObject(new FlightFormObject());
        return actionResult;
    }
View Full Code Here

        return "AddFlight";
    }

    @Override
    public ActionResult perform(HttpServletRequest request) {
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/AddingFlight.jsp");
        FlightFormObject flightFormObject = new FlightFormObject();
        actionResult.setFormObject(flightFormObject);
        return actionResult;
    }
View Full Code Here

    @Override
    public ActionResult perform(HttpServletRequest request) {
        DAOFactory factory = DAOFactory.getDAOFactory(1);
        //List<Airport> airportList = factory.getAirportDAO().allAirportList();
        //List<Country> countryList = factory.getCountryDAO().allCountryList();
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("index.jsp");
//        if (airportList!=null && countryList!=null) {
//            actionResult.setUrlAddress("/index.jsp");
//        } else {
//            actionResult.setUrlAddress("flt/FlightNotFound.jsp");
//        }
        AirportCountryFormObject airportCountryFormObject = new AirportCountryFormObject();
        //airportCountryFormObject.setAirportList(airportList);
        //airportCountryFormObject.setCountryList(countryList);
        actionResult.setFormObject(airportCountryFormObject);
        return actionResult;
    }
View Full Code Here

    public String getName() {
        return "MainFlight";
    }

    public ActionResult perform(HttpServletRequest request) {
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/MainFlight.jsp");
        actionResult.setFormObject(new FlightFormObject());
        return actionResult;
    }
View Full Code Here

            log.info("I catch an exception "+e);
        }
        Flight flight = factory.getFlightDAO().showInformation(trui);
        flight.setDepartureAirport(factory.getAirportDAO().loadCountryName(flight.getDepartureAirport()));
        flight.setDestinationAirport(factory.getAirportDAO().loadCountryName(flight.getDestinationAirport()));
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/ShowFlightInformation.jsp");
        if (flight!=null) {
            actionResult.setUrlAddress("/flt/ShowFlightInformation.jsp");
        } else {
            actionResult.setUrlAddress("flt/FlightNotFound.jsp");
        }
        FlightFormObject flightFormObject = new FlightFormObject();
        flightFormObject.setFlight(flight);
        actionResult.setFormObject(flightFormObject);
        return actionResult;
    }
View Full Code Here

        return "MainCountry";
    }

    @Override
    public ActionResult perform(HttpServletRequest request) {
        ActionResult actionResult = new ActionResult();
        actionResult.setUrlAddress("flt/MainCountry.jsp");
        actionResult.setFormObject(new FlightFormObject());
        return actionResult;
    }
View Full Code Here

TOP

Related Classes of frwa.ActionResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.