Page 1 of 1

infinite scrolling

Posted: Tue Oct 08, 2013 1:39 pm
by Dimitris Monastiriotis

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


infinite scrolling

Posted: Tue Oct 08, 2013 2:01 pm
by Maryna Brodina

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.


infinite scrolling

Posted: Wed Oct 09, 2013 11:01 am
by Dimitris Monastiriotis

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


infinite scrolling

Posted: Wed Oct 09, 2013 12:10 pm
by Maryna Brodina

[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


infinite scrolling

Posted: Wed Oct 09, 2013 1:56 pm
by Dimitris Monastiriotis

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?


infinite scrolling

Posted: Wed Oct 09, 2013 5:02 pm
by Kateryna Grynko

Hi Dimitris,

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