Sorry, here attached is a fix of this bug.
public String index() {
if ("true".equals(p(Constants.PAGED)) || p("npage") != null) {
int npage = (p("npage") != null) ? Integer.parseInt(p("npage")) : 1;
int limit = 5;
String conditionsSQL = "1=1";
Paginator page = Post.page(npage).limit(limit).where(conditionsSQL).getPaginator();
setViewData("post_page", page);
return renderView("paged_list");
}
setViewData("posts", Post.findAll());
return null;
}