@Override
@EntryPoint
public ActionForward manageProcesses(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
SearchPhdIndividualProgramProcessBean searchBean =
(SearchPhdIndividualProgramProcessBean) getObjectFromViewState("searchProcessBean");
if (searchBean == null) {
searchBean = initializeSearchBean(request);
}
AndPredicate<PhdIndividualProgramProcess> predicate = searchBean.getPredicates();
predicate.add(new Predicate<PhdIndividualProgramProcess>() {
@Override
public boolean eval(PhdIndividualProgramProcess process) {
return process.isAllowedToManageProcess(Authenticate.getUser());
}
});
request.setAttribute("searchProcessBean", searchBean);
request.setAttribute("processes", PhdIndividualProgramProcess.search(searchBean.getExecutionYear(), predicate));
RenderUtils.invalidateViewState();
return mapping.findForward("manageProcesses");
}