}
private void addPreviousNextButtons(HtmlContainer container, HtmlHiddenField page, String previousName, String nextName) {
if (this.pagedValue && getPageContainerBean().getNumberOfPages(getDefaultObjectsPerPage()) > 0) {
if (getPageContainerBean().hasPreviousPage(getDefaultObjectsPerPage())) {
HtmlSubmitButton previousButton = new HtmlSubmitButton();
previousButton.setText(RenderUtils.getResourceString(getBundle(), "pages.button.previous"));
previousButton.setName(getLocalName(previousName));
previousButton.setController(new PreviousController(page));
container.addChild(previousButton);
}
container.addChild(new HtmlText(getPageContainerBean().getPage() + " / "
+ getPageContainerBean().getNumberOfPages(getDefaultObjectsPerPage())));
if (getPageContainerBean().hasNextPage(getDefaultObjectsPerPage())) {
HtmlSubmitButton nextButton = new HtmlSubmitButton();
nextButton.setText(RenderUtils.getResourceString(getBundle(), "pages.button.next"));
nextButton.setName(getLocalName(nextName));
nextButton.setController(new NextController(page));
container.addChild(nextButton);
}
}
}