package tryslim3.controller.crud2;

import java.util.logging.Logger;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.util.BeanUtil;

import tryslim3.model.Crud2Form;
import tryslim3.service.Crud2Service;

public class SearchController extends Controller {
    private static final Logger logger =
        Logger.getLogger(IndexController.class.getName());

    private Crud2Service service = new Crud2Service();

    @Override
    public Navigation run() throws Exception {
        Crud2Form form = new Crud2Form();
        BeanUtil.copy(request, form);
        // logger.info(form.toString());
        requestScope("crud2List", service.getList(form));
        return forward("/crud2/index.jsp");
    }
}