Sightly Pagination Component using Sling Model and JavaScript Use API in AEM 6.1 | Community
Skip to main content
edubey
Level 10
Feb 24, 2016 10:01 PM UTC

Sightly Pagination Component using Sling Model and JavaScript Use API in AEM 6.1

Sightly pagination component which works together with some of the important concepts of AEM like Query Builder, Sling Model, JavaScript Use API and Sightly. In terms of functionality of this component its very similar to what we have in our AEM Community.

Read complete article here: http://adobeaemclub.com/sightly-pagination-component-using-sling-model-and-javascript-use-api-in-aem-6-1/

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

12 replies

Level 4
Aug 10, 2018 7:46 PM UTC

Thanks Jitender for the response.

Thanks

Rajeev

Translate
Jitendra_S_Toma
Level 10
Aug 10, 2018 7:36 PM UTC

Well,

First thing, if ajax request does not have too many parameters then use selectors. Secondary make sure you have TTL & Max age, cache enable for these request. There are other settings as well at the akamai & Dispatcher level for caching ajax request. Talk to dev ops if you need help.

Regards,

Jitendra

Translate
Jitendra_S_Toma
Level 10
Aug 10, 2018 7:10 PM UTC

Hi Guys,

Both approaches are okay however if you are not catching ajax request then go with build response with JSON data & Html templating..handlebar or Dust js.

Having html in response is quite a heavy ajax response and mostly it is not preferred. but if you can cache ajax response then this could be useful. Another drawback is that if the response is cached then you need to find a way to keep refresh the same cache.

I hope this helps.

Translate
Level 4
Aug 10, 2018 7:21 PM UTC

Hi Jitendra,

what is the recommended approach to cache the ajax response from each ajax pagination request?

Translate
Level 4
Aug 10, 2018 3:45 PM UTC

This URL is not working. Can you please share the correct URL for reference.

Translate
arunpatidar
New Participant
Aug 10, 2018 6:07 PM UTC
Level 4
Aug 10, 2018 6:13 PM UTC

Thanks Arun. Here I see Javascript Use API has been used.. Instead can we use sling model which is recommended approach? Also, I think it is not using Ajax call. It seems to be traditional approach..

Translate