1

i have a o:datatable with pagination. Here is the code:

enter code <o:dataTable id="table" value="#{Bean.vproduct}" var="product" pageSize="3">
  <f:facet name="header">
    <h:outputText value="Header" styleClass="title"/>
   </f:facet>   
  <o:column>
    <h:panelGrid columns="1">
      <h:outputText value="#{product.description}"/>
    </h:panelGrid>
  </o:column>
  <f:facet name="below">
   <h:panelGroup id="panelGroup">
    <o:dataTablePaginator id="paginator"/>
   </h:panelGroup>
 </f:facet>

At the most I have 2 pages, not more and to navigate from page 1 to page 2 works, but when I am on page 2 I can't naviagte back to the first page.

Can anyone help me please?

Raidri
  • 17,258
  • 9
  • 62
  • 65
  • ok, just for trying, I set the pageSize-attribute from 3 to 1: pageSize="1". The result was, it's not just the problem that i can't navigate back, no, navigation works only one time. I can only press the button "foward" one time, after pressing once the table doesn't navigate. Anyone an idea? – user1351937 Apr 25 '12 at 04:21

1 Answers1

1

I've solved the problem. It has something to do with Partial state saving:

Getting class java.lang.ClassCastException for two consequent AJAX calls called from within a composite component

Jsf Error : java.lang.ClassCastException

I have put this in my web.xml and now it works

<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>
Community
  • 1
  • 1