Dimitris Monastiriotis
Posts: 0
Joined: Sat May 25, 2013 11:22 am

infinite scrolling

Hi, I am implementing infinite scrolling in my application, and the issue I am facing is that when I call the service to retrieve the next part of the data the last set disappears. Is there a way to make a service add the next set of data?

example: i have records 1 to 10 when users reaches bottom of page the service runs and now displays records 11 to 20.

I need instead to add the next 10 records on the screen and show 20 records in total.

thanx for any suggestions

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

infinite scrolling

Hello! It's not possible to do with mapping because while mapping data is refreshed. Use service Success event and JS to add elements on page.

Dimitris Monastiriotis
Posts: 0
Joined: Sat May 25, 2013 11:22 am

infinite scrolling

hmm, ok I am writing custom code to do this,

  1. can I still use the mapping to display the initial data and then use the script to lazy load the rest or I need to load all data using my script? If yes how can i then disable the mapping?

  2. I saw that in mapping a json response to a grid(table) using the tool in the service it does not add rows in a table but rather creates new tables in a wrapper should I use the same approach or I can program to add new rows in a a single table? The existing table is fairly complex as it contains tables within table to achieve the desired layout.

    thanx

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

infinite scrolling

[quote:]can I still use the mapping to display the initial data and then use the script to lazy load the rest or I need to load all data using my script? If yes how can i then disable the mapping?[/quote] you can add two services on page - one with mapping, another one without mapping and use each service for different purpose

[quote:]should I use the same approach or I can program to add new rows in a a single table[/quote] it's up to you

Dimitris Monastiriotis
Posts: 0
Joined: Sat May 25, 2013 11:22 am

infinite scrolling

one more question the tables created for each json object are inside the div below:

Since the div does not have a name to use the Appery("element name").append(HtmlvarName) how can I add the extra code generated? can I just use the class name?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

infinite scrolling

Hi Dimitris,

You can use any CSS selector instead of codeAppery("element name").append(HtmlvarName);/code
For example:code$(".classname").append(HtmlvarName);/code

Return to “Issues”