]
Lincoln Baxter III closed SEAMFORGE-274.
----------------------------------------
Assignee: Lincoln Baxter III
Fix Version/s: 1.0.0.Beta2
Resolution: Done
Pagination in Scaffolding can only go two pages deep
----------------------------------------------------
Key: SEAMFORGE-274
URL:
https://issues.jboss.org/browse/SEAMFORGE-274
Project: Seam Forge
Issue Type: Bug
Components: Scaffold
Affects Versions: 1.0.0.Beta1
Reporter: Lincoln Baxter III
Assignee: Lincoln Baxter III
Fix For: 1.0.0.Beta2
http://seamframework.org/162255.lace
this pagination code of
https://github.com/forge/core/blob/master/scaffold-metawidget/src/main/re...,
{code}pagination = new PaginationHelper<xyz.class>(10){code}
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.
{code}public PaginationHelper<(a){entity.getName()}> getPagination(){
if (pagination == null){
pagination = new PaginationHelper<(a){entity.getName()}>(10){
@Override
public int getItemsCount() {
return count((a){entity.getName()}.class);
}
@Override
public List<(a){entity.getName()}> createPageDataModel(){
return new ArrayList<@{entity.getName()}>(findAll((a){entity.getName()}.class,
getPageFirstItem(), getPageSize() ));
}
};
}
return pagination;
}{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: