Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 1.0.0.Beta1
-
Fix Version/s: 1.0.0.Beta2
-
Component/s: Scaffold
-
Labels:None
Description
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;
|
}
|
Gliffy Diagrams
Activity
- All
- Comments
- Work Log
- History
- Activity
- Links Hierarchy
BackingBean.jv should annotated by "@SessionScoped"
DatasourceProducer annotated by "@ConversationScoped" also have some bugs so I use transaction-type="RESOURCE_LOCAL"