我的数据列表的分页在 primefaces mobile 上不起作用,它显示 1000 行而不是 5 行!我将我的 pf 版本从 5.1 更改为 5.2,但什么也没发生。我检查了展示柜并阅读了 pf 5.2 指南,但没有找到解决方案。这是我的代码:
listPromotion.xhtml
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:pm="http://primefaces.org/mobile"
xmlns:p="http://primefaces.org/ui"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
>
<pm:header title="Vos promotions"></pm:header>
<pm:content>
<h:form id="form2">
<p:outputPanel autoUpdate="true">
<p:dataList value="#{partnerListPromotion.promotions}"
var="promotion"
pt:data-inset="true"
paginator="true"
rows="5">
<p:commandLink
action="#{partnerListPromotion.
goToPartnerDetailPromotion(promotion)}"/>
</p:dataList>
</p:outputPanel>
</h:form>
</pm:content>
index.xhtml请注意,dev.xtml 只是访问 listPromotion.xhtml 的一种方式。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:pm="http://primefaces.org/mobile"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<f:view renderKitId="PRIMEFACES_MOBILE" />
<h:head>
<script type="text/javascript" src="javascript/geolocalisationPartner.js"></script>
<script type="text/javascript" src="javascript/refreshTimePromotion.js"></script>
</h:head>
<h:body>
<!-- dev -->
<pm:page id="dev" lazy ="false">
<ui:include src="trash/dev.xhtml"/>
</pm:page>
<pm:page id="partnerListPromotion" lazy="true">
<ui:include src="/Partner/listPromotion.xhtml"/>
</pm:page>
</h:body>
我的行家pom.xml:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
</dependency>
谢谢。