<p:dataList> liveScroll not working

UI Components for JSF
Post Reply
sparrow
Posts: 4
Joined: 19 Jul 2014, 13:39

19 Jul 2014, 13:53

I've created a dataList to display my database information. But I need to make it so that it has liveScroll, meaning, I can keep scrolling down and once I hit a certain number of records displayed (I've set it to 3 here) a button should appear saying "More Results" that would load more results. I know it's possible, I've seen it here:
http://forum.primefaces.org/viewtopic.p ... 383#p98383

But for me it's not working, it just displays the full dataList with all the database records instead of just showing 3 at a time like I set it to.

here is my dataList:

Code: Select all

<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>
I'm using primefaces 5.0. What am I doing wrong?

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

21 Jul 2014, 19:27

Not everything from previous PF Mobile is implemented in PF5 (with mobile embedded)

sparrow
Posts: 4
Joined: 19 Jul 2014, 13:39

22 Jul 2014, 12:52

kukeltje wrote:Not everything from previous PF Mobile is implemented in PF5 (with mobile embedded)
Thank you for the reply. I now know that and I rolled back to PFM 0.9.4 with Primefaces 4.0 and alot of functionalities like autocomplete, filters, auto dividers were working but the livescroll wasn't implemented until version 0.9.5. So I wanted to use version 0.9.5 instead, but how can I do that? PFM 0.9.5 isn't working with Primefaces 4.0, Netbeans doesn't run the project. I get the error "The module has not been deployed" and on the glassfish logs I have the following error:

Code: Select all

SEVERE:   Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: 

Source Document: jar:file:/C:/Users/sparrow/Documents/NetBeansProjects/PFMTest/build/web/WEB-INF/lib/primefaces-mobile-0.9.5.jar!/META-INF/faces-config.xml

Cause: Class 'org.primefaces.mobile.renderkit.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
The contents of my faces-config.xml file are:

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

    
    <application>
        <default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
    </application>

</faces-config>
I can get PFM 0.9.4 working with Primefaces 4.0 but not PFM 0.9.5. What am I doing wrong?

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Jul 2014, 13:13

just add commons upload to your project (even if you do not use it)

sparrow
Posts: 4
Joined: 19 Jul 2014, 13:39

28 Jul 2014, 15:03

thank you, that worked, however I got another error everytime I tried to use <p:dataList> in the page so I ended up using primeface mobile 1.0 and all worked out. If anyone reading this wants to use the liveScroll feature with <p:dataList>, use Primefaces 4.0 with Primefaces mobile 1.0 and it will work.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

28 Jul 2014, 21:46

Would have been more helpful ifyou posted a new topic with details about the error. Your 'advice' is rather unsubstantiated

sparrow
Posts: 4
Joined: 19 Jul 2014, 13:39

29 Jul 2014, 00:19

kukeltje wrote:Would have been more helpful ifyou posted a new topic with details about the error. Your 'advice' is rather unsubstantiated
I'm sorry, I just didn't provide more details about the error because I assumed using a more recent version like 1.0 is a better solution than trying to debug a probable user error on an older version like version 0.9.5, atleast for me it was.

And it's not that my 'advice' is unsubstantiated, I didn't change anything from what I posted. I'm using the same code I posted above for the dataList, I simply removed PFM 0.9.5 from my project's classpath and added PFM 1.0 instead. That was the only thing I changed to make it work. Sorry if I wasn't clear about that.

I still kept the commons-fileupload package like you recommended or else I would get that same error.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

29 Jul 2014, 01:26

Sorry, I thought you rolled back from pf5 to 4+mobile. Sorry again

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 33 guests