Primefaces Mobile - Pagination

UI Components for JSF
Post Reply
chaudharydeepak08
Posts: 2
Joined: 19 May 2013, 03:48

19 May 2013, 03:52

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.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

19 May 2013, 06:47

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
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

31 May 2013, 06:55

sudheer wrote: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
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

Image


Screen capture 2 of 2: empty rows at bottom of list AFTER clicking 'More...' button

Image

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).
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

lazaronixon
Posts: 172
Joined: 05 Jan 2011, 22:02

31 May 2013, 16:34

It is fixed yet. But you need compile by source

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

31 May 2013, 17:02

lazaronixon wrote:It is fixed yet. But you need compile by source
I'll wait for JAR...as I usually/always do. Thanks. :)
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests