The pagination of my datalist is not working on primefaces mobile, it shows 1000 rows instead of 5! I changed my pf version from 5.1 to 5.2 and nothing happened. I checked the showcase and read the pf 5.2 guide and I don't find the solution. Here my code :
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 Note that dev.xtml is just a way to access to 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>
My maven pom.xml :
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
</dependency>
Thanks.
The problem was glassfish still used primefaces 5.1 even if I put primefaces 5.2 in my pom.xml. So I had to remove all the primefaces folder in the maven repository in my home : .m2/repository/org/primefaces except 5.2. Then Glassfish used 5.2 and pagination worked !