我正在使用 Primefaces 移动设备,并且创建了一个 dataList 来显示我的数据库信息。但我需要让它具有 liveScroll,意思是,我可以继续向下滚动,一旦我点击显示的一定数量的记录(我在这里将它设置为 3),应该会出现一个按钮,上面写着“更多结果”加载更多结果。我知道这是可能的,我在这里看到过:http: //forum.primefaces.org/viewtopic.php?f=8 &t=30479&p=98383#p98383
但对我来说它不起作用,它只是显示包含所有数据库记录的完整数据列表,而不是像我设置的那样一次显示 3 个。
<p:dataList id="dataList" value="#{search.dbRecord}" var="record" paginator="true" rows="3" >
<f:attribute name="paginatorText" value="More Results" />
<p:column>
<h:outputLink value="#">
<h2>#{record.name}</h2>
<h2>#{record.number}</h2>
</h:outputLink>
</p:column>
</p:dataList>
我究竟做错了什么?
编辑:原来这个功能在 Primefaces 5.0 中仍然不起作用,所以我使用 Primefaces mobile 0.9.4