use of com.agiletec.aps.tags.util.PagerTagHelper in project entando-core by entando.
the class PagerTag method doStartTag.
@Override
public int doStartTag() throws JspException {
ServletRequest request = this.pageContext.getRequest();
try {
Object object = this.pageContext.getAttribute(this.getListName());
Collection collection = (null != object && object instanceof SimpleSequence) ? ((SimpleSequence) object).toList() : (Collection) object;
if (collection == null) {
_logger.error("There is no list in the request");
} else {
PagerTagHelper helper = new PagerTagHelper();
IPagerVO pagerVo = helper.getPagerVO(collection, this.getPagerId(), this.isPagerIdFromFrame(), this.getMax(), this.isAdvanced(), this.getOffset(), request);
this.pageContext.setAttribute(this.getObjectName(), pagerVo);
}
} catch (Throwable t) {
_logger.error("Error detected during tag initialization", t);
// ApsSystemUtils.logThrowable(e, this, "doStartTag");
throw new JspException("Error detected during tag initialization", t);
}
return EVAL_BODY_INCLUDE;
}
Aggregations