Primefaces 数据列表分页5.2不工作
我的数据列表的分页在primefaces mobile上不起作用,它显示的是1000行而不是5行!我将我的pf版本从5.1改为5.2,但什么也没发生。我查看了展示并阅读了pf 5.2指南,但没有找到解决方案。这是我的代码: listPromotion.xhtmlPrimefaces 数据列表分页5.2不工作,primefaces,pagination,primefaces-mobile,Primefaces,Pagination,Primefaces Mobile,我的数据列表的分页在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.s
<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>
My mavenpom.xml:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
</dependency>
org.primefaces
素面
5.2
谢谢。问题是glassfish仍然使用primefaces 5.1,即使我将primefaces 5.2放在pom.xml中。因此,我必须删除我家maven存储库中的所有primefaces文件夹:.m2/repository/org/primefaces,5.2除外。然后Glassfish使用了5.2,分页成功了 我只是在我的glassfish日志中发现了这一点:“Infos:Running on PrimeFaces 5.1 Infos:Running on PrimeFaces 5.1”,所以我将尝试强制PrimeFaces 5.2,然后回到这篇文章。