Pagination

When a call center or store user performs a search for orders, customers, products, and so on, the result is distributed across pages, if too many records are returned. Therefore, a user should be able to navigate to the page that contains the required information using the pagination feature.

Solution

A pagination bar indicates the total number of records that are displayed on the current page. From the pagination bar, the user can choose to view the required number of records per page.

The application is configured to display 10 records per page, which is the default page size when the page loads. However, the user can choose a value from the set of configured page sizes such as 5, 10, 20, or 40.

Note: Pagination is allowed on screens where the user can only view information.

Implementation

The page sizes can be configured specifically for each entity. The entities are Order, Customer, CatalogSearch, and so on. For example, to configure the page size for return orders, you can use the Order entity.

You can configure the page sizes in the PaginationSize.json file, which is located in the/isccs/common/pagination/ directory. In this file, you can specify the page sizes for each entity as shown in the following sample code snippet:
{
	Entities: {
		"Order": {
			"PageSize": 10,
			"PageSizes": "5,10,20,40"
		},
		"Default":{
			"PageSize": 10,
			"PageSizes": "5,10,20,40"
		}
	}
}
The attributes in the code snippet are as follows:
  • PageSize: represents the number of records that are displayed when a page loads.
  • PageSizes: represents the different page sizes that the user can select.
You can modify the page size entries as required for an implementation. Similarly, you can include the page size entries for extended entities. If you do not set the page size for an entity, the default configuration is considered. For more information, see Customizing pagination size.

End-user impact

The user can select the correct page size for viewing convenience.