LOGGER.severe("Date: " + calendar.getTime());
paginator.setSize(this.serviceLocator.getCourseService().countUpdatedCourses(calendar.getTime(), true));
if((page-1)*paginator.getOffset() > paginator.getSize()) {
throw new GenericException("Paginator Out of Range!!! Size: " + paginator.getSize() + " start: " + (page-1)*paginator.getOffset());
}
paginator.setStart((page-1)*paginator.getOffset());
paginator.setCollection(this.serviceLocator.getCourseService().getUpdatedCourses(calendar.getTime(), true,
"-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd()));
/*paginator.setCollection(this.serviceLocator.getCourseService().getCourses(true,
"-" + ORDERING_PROPERTY, locale, paginator.getStart(), paginator.getEnd())); */
model.addAttribute("paginator", paginator);
model.addAttribute("type", "reglated");
response.addDateHeader("Last-Modified", calendar.getTimeInMillis());
} catch(Exception e) {
throw new GenericException(e);
}
return "catalog.course.list";
}