Examples of FindSpacesBean


Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    @EntryPoint
    public ActionForward prepareSearchSpaces(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        FindSpacesBean bean = new FindSpacesBean();
        request.setAttribute("bean", bean);
        return mapping.findForward("listFoundSpaces");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    }

    public ActionForward prepareSearchSpacesPostBack(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        FindSpacesBean bean = getRenderedObject("beanWithLabelToSearchID");
        request.setAttribute("bean", bean);
        RenderUtils.invalidateViewState("beanWithLabelToSearchID");
        return mapping.findForward("listFoundSpaces");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    }

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

        FindSpacesBean bean = getRenderedObject("beanWithLabelToSearchID");
        if (bean != null) {

            String labelToSearch = bean.getLabelToSearch();
            Space campus = bean.getCampus();
            Space building = bean.getBuilding();

            if (campus != null && building == null && (labelToSearch == null || StringUtils.isEmpty(labelToSearch.trim()))) {
                addActionMessage(request, "error.findSpaces.empty.building");
                request.setAttribute("bean", bean);
                return mapping.findForward("listFoundSpaces");
            }

            if (campus == null && (labelToSearch == null || StringUtils.isEmpty(labelToSearch.trim()))) {
                addActionMessage(request, "error.findSpaces.empty.labelToSearch");
                request.setAttribute("bean", bean);
                return mapping.findForward("listFoundSpaces");
            }

            List<FindSpacesBean> result = new ArrayList<FindSpacesBean>();
            Set<Space> resultSpaces = SpaceUtils.findSpaces(labelToSearch, campus, building, bean.getSearchType());
            for (Space space : resultSpaces) {
                result.add(new FindSpacesBean(space, bean.getSearchType(), AcademicInterval
                        .readDefaultAcademicInterval(AcademicPeriod.SEMESTER)));
            }

            request.setAttribute("foundSpaces", result);
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    }

    public ActionForward searchWithExtraOptions(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        FindSpacesBean bean = getRenderedObject("beanWithLabelToSearchID");
        bean.setExtraOptions(true);
        request.setAttribute("bean", bean);
        RenderUtils.invalidateViewState("beanWithLabelToSearchID");
        return mapping.findForward("listFoundSpaces");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    }

    public ActionForward searchWithoutExtraOptions(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        FindSpacesBean bean = getRenderedObject("beanWithLabelToSearchID");
        bean.setExtraOptions(false);
        bean.setCampus(null);
        bean.setBuilding(null);
        request.setAttribute("bean", bean);
        RenderUtils.invalidateViewState("beanWithLabelToSearchID");
        return mapping.findForward("listFoundSpaces");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

            setBlueprintTextRectangles(request, space);
            List<Space> containedSpaces =
                    space.getChildren().stream().sorted(SpaceUtils.COMPARATOR_BY_PRESENTATION_NAME).collect(Collectors.toList());
            request.setAttribute("containedSpaces", containedSpaces);
            request.setAttribute("selectedSpace",
                    new FindSpacesBean(space, AcademicInterval.readDefaultAcademicInterval(AcademicPeriod.SEMESTER)));
        }

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

Examples of org.fenixedu.academic.dto.spaceManager.FindSpacesBean

    @Override
    public Object provide(Object source, Object currentValue) {

        Set<Space> result = new HashSet<Space>();
        FindSpacesBean bean = (FindSpacesBean) source;
        Space campus = bean.getCampus();

        SpaceClassification building = SpaceClassification.getByName("Building");

        if (campus != null) {
            for (Space child : campus.getChildren()) {
View Full Code Here
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.