我有一个带有分页的o:datatable。代码如下:
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>
我最多有2页,不会更多,并且可以从第1页导航到第2页,但当我在第2页时,我不能导航回第一页。
有谁能帮帮我吗?
发布于 2012-04-27 04:24:59
我已经解决了问题。它与部分状态保存有关:
Getting class java.lang.ClassCastException for two consequent AJAX calls called from within a composite component
Jsf Error : java.lang.ClassCastException
我已经把它放到我的web.xml里了,现在它可以工作了
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>https://stackoverflow.com/questions/10285790
复制相似问题