Page 1 of 1
Primefaces Mobile - Pagination
Posted: 19 May 2013, 03:52
by chaudharydeepak08
I recently started using PM for building an enterprise application. Framework is very impressive. Is there a way pagination can work in JSF mobile? I tried using datatable as well as datalist. Looking for some help.
Re: Primefaces Mobile - Pagination
Posted: 19 May 2013, 06:47
by sudheer
PFM paginator is not yet implemented and even not documented in PFM guide.But you can use livescroll feature from PFM 0.9.5 release
https://code.google.com/p/primefaces/is ... il?id=2964
Re: Primefaces Mobile - Pagination
Posted: 31 May 2013, 06:55
by smithh032772
Thanks Sudheer for responding to this topic, but I just tested the PrimeFaces Mobile p:dataList pagination or 'live scroll', and there is a bug with this.
I added paginator options/xhtml to p:dataList on one of my PrimeFaces Mobile xhtml pages (see below),
Code: Select all
<p:dataList id="mainOrdersBrowseDataList" var="trip"
paginator="true" rows="10"
value="#{pf_ordersController.mobileOrderList}">
<f:attribute name="paginatorText" value="More..." />
<p:column>
<h3>
<h:commandLink value="#{trip.tripDate}"
action="#{pf_ordersController.setMobileOrderAndView(trip)}"
onclick="displayLoadingImage(true);"/>
</h3>
<p>#{trip.orderNumber}</p>
<p>#{trip.customer}</p>
<p>Origin: #{trip.origin}</p>
<p>Destination: #{trip.destination}</p>
<p>Driver/Subcontractor: #{trip.driver}</p>
<p>Vehicle: #{trip.vehicle}</p>
<p:selectBooleanCheckbox value="#{trip.selected}" itemLabel="Select"/>
</p:column>
</p:dataList>
and there is/are empty row(s) prior to the 'More...' button 'and' at the bottom of the list after clicking 'More...' to see 'all rows'.
Screen capture 1 of 2: empty rows BEFORE 'More...' button
Screen capture 2 of 2: empty rows at bottom of list AFTER clicking 'More...' button
Doh, my bad. Screen capture 2 above does not capture what I experienced while testing paginator with another range of data in the database, but obviously, there is a bug/defect that needs to be fixed. Surely, we don't want empty rows. it might be caused by the fact that I wrap with p:column, but sample code provided in issue tracker does NOT have p:column (added to p:dataList).
Re: Primefaces Mobile - Pagination
Posted: 31 May 2013, 16:34
by lazaronixon
It is fixed yet. But you need compile by source
Re: Primefaces Mobile - Pagination
Posted: 31 May 2013, 17:02
by smithh032772
lazaronixon wrote:It is fixed yet. But you need compile by source
I'll wait for JAR...as I usually/always do. Thanks.