Customize the page size in the pagination

Thank you for your visiting.
I want to customize the page size while viewing the users’ information on Crowd platform.

The primary class implementing the function is AbstractBrowser.class as follows.

package com.atlassian.crowd.console.action;

import com.atlassian.crowd.core.tiny.PairType;
import com.atlassian.crowd.util.CommonUIDefinitions;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public abstract class AbstractBrowser<T> extends BaseAction
  protected int resultsStart = 0;

  protected int resultsPerPage = 5;  //from 10 to 5

  protected List<T> results = null;

  public int getResultsStart()
    return this.resultsStart;

I tried to configure the class as ‘action’ element or ‘component’ in attlassian-plugin.xml file, but it doesn’t work.

Is there an effective way to do it ?

Thank you.

You can’t override classes through the p2 add-on (well there are ways but nothing that you should/want to do). In this case you’re better off looking at the Crowd api: Crowd developer documentation and creating a servlet in your add-on that looks/behaves your way.

Crowd’s api doesn’t have the concept of hooking into their internal view layer - servlets are the only way to go.