Package org.fenixedu.academic.dto.administrativeOffice.externalUnits

Examples of org.fenixedu.academic.dto.administrativeOffice.externalUnits.ExternalUnitsSearchBean


public class ExternalUnitsDispatchAction extends FenixDispatchAction {

    @EntryPoint
    public ActionForward prepareSearch(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        request.setAttribute("searchBean", new ExternalUnitsSearchBean());
        return mapping.findForward("searchExternalUnits");
    }
View Full Code Here


    }

    public ActionForward search(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {

        final ExternalUnitsSearchBean searchBean = getRenderedObject();
        request.setAttribute("searchBean", searchBean);

        if (StringUtils.isEmpty(searchBean.getUnitName())) {
            addActionMessage("error", request, "error.externalUnits.invalid.unit.name");
        } else {
            searchBean.clearResults();
            searchUnits(searchBean);
            searchExternalCurricularCourses(searchBean);
            Collections.sort(searchBean.getResults(), new BeanComparator("fullName"));
            searchBean.setEarthUnit(UnitUtils.readEarthUnit());
        }

        return mapping.findForward("searchExternalUnits");
    }
View Full Code Here

        return viewUnit(mapping, request, unit);
    }

    private ActionForward viewUnit(ActionMapping mapping, HttpServletRequest request, final Unit unit) {
        if (unit.isPlanetUnit()) {
            request.setAttribute("searchBean", new ExternalUnitsSearchBean());
            return mapping.findForward("searchExternalUnits");
        } else {
            request.setAttribute("unitResultBean", new ExternalUnitResultBean(unit));
            buildUnitBean(request, unit);
            return mapping.findForward(findForwardNameFor(unit));
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.administrativeOffice.externalUnits.ExternalUnitsSearchBean

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.