page.writeStart("ul", "class", "pagination");
if (result.hasPrevious()) {
page.writeStart("li", "class", "next");
page.writeStart("a",
"href", page.url("", "offset", result.getPreviousOffset()));
page.writeHtml("Previous ");
page.writeHtml(result.getLimit());
page.writeEnd();
page.writeEnd();
}