use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsDictionaryListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(handler.getBoolean("multiple"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsLotteryListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
Boolean disabled = false;
if (handler.getBoolean("advanced", false)) {
disabled = handler.getBoolean("disabled", false);
}
PageHandler page = service.getPage(getSite(handler).getId(), handler.getDate("startStartDate"), handler.getDate("endStartDate"), handler.getDate("startEndDate"), handler.getDate("endEndDate"), disabled, handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsSearchDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
String word = handler.getString("word");
Long[] tagIds = handler.getLongArray("tagId");
if (CommonUtils.notEmpty(word) || CommonUtils.notEmpty(tagIds)) {
SysSite site = getSite(handler);
if (CommonUtils.notEmpty(word)) {
statisticsComponent.search(site.getId(), word);
}
if (CommonUtils.notEmpty(tagIds)) {
for (Long tagId : tagIds) {
statisticsComponent.searchTag(tagId);
}
}
PageHandler page;
Integer pageIndex = handler.getInteger("pageIndex", 1);
Integer count = handler.getInteger("count", 30);
try {
page = service.query(site.getId(), word, tagIds, handler.getInteger("categoryId"), handler.getBoolean("containChild"), handler.getIntegerArray("categoryIds"), handler.getStringArray("modelIds"), handler.getDate("startPublishDate"), CommonUtils.getMinuteDate(), pageIndex, count);
} catch (Exception e) {
page = new PageHandler(pageIndex, count, 0, null);
}
handler.put("page", page).render();
}
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsTagTypeListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(getSite(handler).getId(), handler.getString("name"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 20));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsVoteItemListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(handler.getInteger("voteId"), handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
Aggregations