Examples of PhotographFilterBean


Examples of org.fenixedu.academic.dto.photographs.PhotographFilterBean

    }

    @EntryPoint
    public ActionForward history(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        request.setAttribute("filter", new PhotographFilterBean());
        return mapping.findForward("history");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.photographs.PhotographFilterBean

        return mapping.findForward("history");
    }

    public ActionForward historyFilter(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        PhotographFilterBean filter = getRenderedObject("historyFilter");
        Set<Photograph> photos = rootDomainObject.getPhotographsSet();
        SortedMap<Person, UserHistory> history = new TreeMap<Person, UserHistory>();

        for (Photograph photograph : photos) {
            if (filter.accepts(photograph)) {
                Person person = photograph.getPerson();
                if (history.containsKey(person)) {
                    history.get(person).addPhotograph(photograph);
                } else {
                    UserHistory user = new UserHistory(person);
                    user.addPhotograph(photograph);
                    history.put(person, user);
                }
            }
        }
        request.setAttribute("filter", new PhotographFilterBean());
        request.setAttribute("history", history.values());
        return mapping.findForward("history");
    }
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.