-
Bug
-
Resolution: Done
-
Major
-
1.0.0.Beta1
-
None
http://seamframework.org/162255.lace
this pagination code of https://github.com/forge/core/blob/master/scaffold-metawidget/src/main/resources/org/metawidget/scaffold/BackingBean.jv,
pagination = new PaginationHelper<xyz.class>(10)
will get executed every time next button is pressed (as the backing bean is requestscope) hence will not be able to navigate to 3 rd page, this should be bug in my opinion. I have given short term work around for this, let see what experts have to say.
public PaginationHelper<@{entity.getName()}> getPagination(){ if (pagination == null){ pagination = new PaginationHelper<@{entity.getName()}>(10){ @Override public int getItemsCount() { return count(@{entity.getName()}.class); } @Override public List<@{entity.getName()}> createPageDataModel(){ return new ArrayList<@{entity.getName()}>(findAll(@{entity.getName()}.class, getPageFirstItem(), getPageSize() )); } }; } return pagination; }