もうすこしページをめくる

ちゃんとTable Pagingなどというサンプルが用意されているので、もう少しページをめくる。

ページ


public class Index extends Page {

private Database dbh = null;

public Table table = new Table();

public Index(Database dbh) {
this.dbh = dbh;

table.setAttribute("class", "its");
table.setPageSize(5);

table.addColumn(new Column(Book.ISBN.getName().toLowerCase(), "ISBN"));
table.addColumn(new Column(Book.TITLE.getName().toLowerCase(), "タイトル"));
table.addColumn(new Column(Book.AUTHOR.getName().toLowerCase(), "著者"));
}

public void onRender() {
table.setRowList(Arrays.asList(Book.findAny(dbh, Book.ISBN.order_by())));
}

}

テンプレート


<html>
<head>
$imports
</head>
<body>
$table
</body>
</html>

で…


SI的には微妙な機能かも。