Skip to Content
This is an interesting question that has been asked many times in the KM forums but still did not get answered as the pager classes are hidden in core part of KM libraries, which makes it hard to implement a custom pager component.

For those who are not aware of pager component, please check this screenshot:

Pager screen


To keep this blog short, I will only focus on key points in implementing a pager component and not on complete code examples.

So let us get started…

Create a new portal project in NWDS along with a KM Service Wrapper Class, I think most of you already know about how to create a Service Wrapper Class and if not please refer to KM documentation.

As the Pager is so deeply integrated into collection renderer code, we also have to implement our own collection renderer to implement a custom pager.

As the classes are in private part of KM libraries, we need to copy the following decompiled java classes into our newly created Eclipse project under a different java package structure.

Creating Pager component


 which are in

and create these four classes in your project.

For example,, and

Once this is done, you should make sure that all references of PagerComponent, PagerInterval and LightComponent in your classes are replaced with your local classes.

Now customize the Pager component to your needs and deploy the application on to your server and register the pager component (Check the screenshot below).

Register Pager

Creating collection renderer with Pager



which are in

and create these four classes in your project.

For example and


Once this is done, make sure that all references of CollectionRendererDecorator, PropertyColumnRenderer and PropertyHeaderRenderer in your classes are replaced with your local classes.

Now in CollectionRendererDecorator class register your custom pager component:

In the below code MyPager is the alias of our pager component which we registered in component mapping previously


private Component renderPager() throws WcmException {
        IComponent comp = ComponentFactory.getInstance().getComponent(“MyPager“, proxy, renderer, resource, null);
        if (comp == null) {
            return EmptyHtmlFragment.render();
        } else {
            return comp.render();


Now we should register the CollectionRendererDecorator by overriding the renderDecorations method of LightCollectionRenderer class in MyCollectionListRenderer.


protected Component renderDecorations(Component comp) throws WcmException {
        return new CollectionRendererDecorator(comp, this, getProxy(), getComponentValueMap(), getParentCollection());


Now deploy the application on to your server and register the collection renderer(Check the screenshot below).

Register CollectionRenderer

Please restart the portal so that the CrtClassloader finds the deployed classes of your application.

As the custom collection renderer is now registered you can use it in any Layoutset and check the pager functionality.

Hope I could give you an overall idea in creating a custom pager component, if you still have questions keep posting.

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Sushil K J

    This is a nice & helpful blog.

    Can you please help me letting know how can I display SearchTerm in Pager?



Leave a Reply