Package act.impl

Source Code of act.impl.Index

package act.impl;

import dao.DAOFactory;
import dao.tro.Airport;
import dao.tro.Country;
import frwa.ActionResult;
import frwa.IAction;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class Index implements IAction {

    @Override
    public String getName() {
        return "Index";
    }

    @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;
    }
}
TOP

Related Classes of act.impl.Index

TOP
Copyright © 2018 www.massapi.com. 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.