Monday, February 22, 2016

Implementing pagination on search in 12c

Pagination on search pages is quite a common requirement and with introduction of WebCenter Sites 12c, it has become even more easier to do so. If you are looking for implementing pagination on search results for 11g, you can check my old post here.

With introduction of new server-side api, its very easy to perform CRUD operation on assets. For searching assets, Searcher helper class provides methods to include various options which is very easier to implement.
Note: For using Searcher, global indexes for the assettype should be enabled.

Following is simple illustration of searching product assets of particular locale (en_US) in FirstSiteII, it can also search on product name, order by date and shows 10 results per page.

Click here to download this sample groovy class.

Need help? Click here.

3 comments:

  1. Many Thanks.. It helps alot :)

    ReplyDelete
  2. How to implement same on 11.1.8

    ReplyDelete
    Replies
    1. http://fatwirecode.blogspot.in/2015/07/implementing-pagination-on-search.html

      Delete