Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Pagination not quite working as expected

Hi Joe,

I gave you two solutions(second was just a plan).

  1. First solution increase requested/responsed data every time user click on the button.

  2. Second solution just "injects" new portion of data into the list. But it's a little bit hard to implement and needs understanding of JS and DOM.

    Regards.

Joe Tenga
Posts: 0
Joined: Fri Dec 12, 2014 4:11 am

Pagination not quite working as expected

Yurii,
Thank you, I had added a bunch of data to my test set and discovered that #1 was not a Lazy Load solution. I am really in need of the lazy load solution.

I have advanced beginner to intermediate JS/DOM skills so I don't think #2 is out of reach as long as i have some help. Would you be willing to flesh #2 out a bit more? I have to believe that this thread will be utilized by many Appery users as Lazy Load is a critical feature on many mobile apps.
Thanks in advance.
-Joe

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Pagination not quite working as expected

Hello Joe,

1)You should find with jquery object that you would like to copy.
In your case it should be list item template - it has next attribute inside of the tag: data-appery-tpl="true"
Please find more about jquery selectors here: http://api.jquery.com/category/select...
BTW: jquery is already integrated inside Appery.io
2) Clone your tag in the variable
3) Append it to the same parent as your cloned tag
4) Change content of the tag (text() or val())
5) Remove css classes that makes it invisible on the page, and data-appery-tpl="true" attribute
6) Make all for next items from input array

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Pagination not quite working as expected

This solution (Yurii's #2 suggestion) is exactly what i'm looking to achieve but I feel I'd need thorough instructions, or documentation.

I think this functionality would give many users apps a faster and smoother feel, as they are only loading more results when they request more, plus the previously loaded results will not need to be re-loaded again if the user returns up the list.

You see this functionality in many major apps that contain lists. For example instagram, twitter, facebook, even Apples built in Messages app does this when you scroll to the top and click 'load earlier messages'.

I'm sure it would be a well used feature on many users apps if there was a clear documentation or instructions on how to achieve this, aimed at those who don't have as much knowledge.

Joe Tenga
Posts: 0
Joined: Fri Dec 12, 2014 4:11 am

Pagination not quite working as expected

This kind of list scrolling is so standard now that an app with Previous and Next buttons are considered embarrassing.

Can we get a clear and complete tutorial on this Appery?

Return to “Issues”