Customizing pagination size
If there are many shipments, products, or packages on a particular screen, they are distributed across multiple pages. Therefore, a store associate must be able to navigate to the page that contains the required information by using the pagination feature.
A pagination bar indicates the current page number. On the pagination bar, the store associate can move to the next or previous page and select the number of records to be displayed on a single page. If the number of records is less than the page size, the pagination bar is not displayed. By default, the application is configured to display five records per page on the web.
The page sizes can be configured specifically for each entity.
The entities are Shipment
, Container
, ShipmentLine
,
and so on.
You can configure the page sizes in the PaginationSize.json
file,
which is in the<INSTALL_DIR>/repository/eardata/wsc/war/wsc/common/pagination directory.
PaginationSize.json
file
to the extensions/wsc/webpages/wsc/common/pagination/ directory.
Build the WAR or EAR and deploy it to verify the changes. Modify the
page size attribute appropriately as shown in the following sample
code: {
Entities: {
"Default":{
"PageSize": 5,
"PageSizes": "5,10,20",
"PageSizeMobile": 3,
"PageSizesMobile": "3,5,10"
},
"Shipment": {
"PageSize": 5,
"PageSizes": "5,10,20",
"PageSizeMobile": 3,
"PageSizesMobile": "3,5,10"
},
"Container": {
"PageSize": 5,
"PageSizes": "5,10,20",
"PageSizeMobile": 3,
"PageSizesMobile": "3,5,10"
},
"ShipmentLine": {
"PageSize": 5,
"PageSizes": "5,10,20",
"PageSizeMobile": 3,
"PageSizesMobile": "3,5,10"
}
"StoreBatchLine": {
"PageSize": 10,
"PageSizes": "10,16,20",
"PageSizeMobile": 4,
"PageSizesMobile": "4,8,10"
},
"StoreBatch": {
"PageSize": 10,
"PageSizes": "10,16,20",
"PageSizeMobile": 4,
"PageSizesMobile": "4,8,10"
},
"StoreBatchLocation": {
"PageSize": 10,
"PageSizes": "10,16,20",
"PageSizeMobile": 4,
"PageSizesMobile": "4,8,10"
}
}
}
PageSize
andPageSizeMobile
: represents the number of records that are displayed when a page loads.PageSizes
andPageSizesMobile
: represents the different page sizes that the store associate can select.
For each entity, the PageSize
and PageSizes
attributes
represent the default page size and page size array. You can modify
these attributes appropriately.
paginationStrategy
: This attribute signifies the pagination strategy which must be used for pagination. Currently, only "NEXTPAGE
" pagination strategy is supported.pageSize
: This is thepageSize
which is defaulted. Page size denotes the number of records in each page.pageSizeType
: This attribute can take any text as a value. This attribute can be used to specify some string values which can be used in custom mashup class as required.
PaginationSize.json
are
considered. If for some reason, the browser scroll bar is not displayed
on a given screen, a down-arrow button is displayed to help in continuous
scrolling.