Pagination in Richfaces based Application Doesnt work on JBO
jfoundation May 13, 2009 8:06 AMWe have extended the ExtendedDataModel to implement pagination,As in
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=115636
Pagination works fine when my application is deployed on tomcat.
when i deploy the same war on JBOSS 4.3,the datatable behaviour is strange.
Scenario:
I have a datatable in one of the pages of my application,the code for the same is as below.
The datatable is rererendered by clicking a commandbutton.This is for search functionality,i load the data in the pagableDataModel in the backing bean,and rerender the table in the front end.
xhtml paga code
<rich:dataTable id="userGroupsList" rows="10"
binding="#{backingBean.table}"
value="#{backingBean.pagableDataModel}" var="groupDTO"
rowKeyVar="rowIndex">
pagableDataModel -> this is datamodel class which extends the ExtendedDataModel
<a4j:commandButton reRender="userGroupsList"
action="#{backingBean.onSearch}" value="Search" />
Backing Bean code
void onSearch {
//this method in my backing bean loads the data in the pagableDataModel object
groupDetailsList=(PagableList)fetchData(page);
pagableDataModel.setPageData(groupDetailsList);
}
Since i am returning to the same page i am not returning a value,
Observation1:
On debug i found the behaviour as follows.
when the page is loaded first time the walk method of my pagableDatamodel recieves values for all the arguments,so no issues.
when i click the commandbutton to load data.i found that
the walk method recives the last argument as null.
ie public void walk(FacesContext context, DataVisitor visitor, Range range,
Object argument) throws IOException
here the argument -> comes as null...
it expects a org.richfaces.renderkit.TableHolder object as argument at runtime.
since the argument is null,my table doesnt get rerendered.
Observation2:
if i return a value from the onSearch Method and define the navigation rule to return to the same page then the whole page gets loaded,which is not desirable,but data gets loaded.
Is this an issue with JBOSS ??As the same code works fine on Tomcat ?
Richfaces jar versions 3.3.0
JSF [jsf-api.jar/jsf-iml.jar] versions - JBOSS Provided [version :1.2_09-b02-FCS]
Also tried to bundle the JSF [jsf-api.jar/jsf-iml.jar] versions - [version :1.2_07] inside the war,but the problem still persists.