UICommand pagerCommand = (UICommand) sheet.getFacet(Facets.PAGER_ROW);
if (pagerCommand == null) {
pagerCommand = createPagingCommand(application, PageAction.TO_ROW, false);
sheet.getFacets().put(Facets.PAGER_ROW, pagerCommand);
}
String pagingOnClick = new CommandRendererHelper(facesContext, pagerCommand).getOnclickDoubleQuoted();
final String pagerCommandId = pagerCommand.getClientId(facesContext);
writer.startElement(HtmlElements.SPAN, null);
writer.writeAttribute(HtmlAttributes.ONCLICK,
"tobagoSheetEditPagingRow(this, '" + pagerCommandId + "', '" + pagingOnClick + "')", true);
writer.writeClassAttribute(Classes.create(sheet, "pagingOuter", showRowRange));
writer.writeAttribute(HtmlAttributes.TITLE,
ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetPagingInfoRowPagingTip"), true);
writer.writeText("");
writer.write(createSheetPagingInfo(sheet, facesContext, pagerCommandId, true));
writer.endElement(HtmlElements.SPAN);
}
// show direct links
final Markup showDirectLinks = markupForLeftCenterRight(sheet.getShowDirectLinks());
if (showDirectLinks != Markup.NULL) {
writer.startElement(HtmlElements.SPAN, null);
writer.writeClassAttribute(Classes.create(sheet, "pagingOuter", showDirectLinks));
writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "pagingLinks");
writeDirectPagingLinks(writer, facesContext, application, sheet);
writer.endElement(HtmlElements.SPAN);
}
// show page range
final Markup showPageRange = markupForLeftCenterRight(sheet.getShowPageRange());
if (showPageRange != Markup.NULL) {
UICommand pagerCommand = (UICommand) sheet.getFacet(Facets.PAGER_PAGE);
if (pagerCommand == null) {
pagerCommand = createPagingCommand(application, PageAction.TO_PAGE, false);
sheet.getFacets().put(Facets.PAGER_PAGE, pagerCommand);
}
String pagingOnClick = new CommandRendererHelper(facesContext, pagerCommand).getOnclickDoubleQuoted();
final String pagerCommandId = pagerCommand.getClientId(facesContext);
writer.startElement(HtmlElements.SPAN, null);
writer.writeClassAttribute(Classes.create(sheet, "pagingOuter", showPageRange));
writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "pagingPages");