2018-09-25 14:48:03 +02:00
|
|
|
import { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Abstract component that defines a refreshable page to be rendered by
|
|
|
|
|
* {@code PagedList}.
|
|
|
|
|
*/
|
|
|
|
|
export default class AbstractPage<P> extends Component<P> {
|
|
|
|
|
/**
|
2021-03-16 11:59:33 -04:00
|
|
|
* Method to be overridden by the implementing classes to refresh the data
|
2018-09-25 14:48:03 +02:00
|
|
|
* content of the component.
|
|
|
|
|
*
|
|
|
|
|
* Note: It is a static method as the {@code Component} may not be
|
2018-11-08 13:25:02 +01:00
|
|
|
* initialized yet when the UI invokes refresh (e.g. Tab change).
|
2018-09-25 14:48:03 +02:00
|
|
|
*
|
2023-04-13 15:49:51 +03:00
|
|
|
* @param {any} _p1 - Param 1.
|
|
|
|
|
* @param {any} _p2 - Param 2.
|
2018-09-25 14:48:03 +02:00
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2023-04-13 15:49:51 +03:00
|
|
|
static refresh(_p1?: any, _p2?: any) {
|
2018-09-25 14:48:03 +02:00
|
|
|
// No implementation in abstract class.
|
|
|
|
|
}
|
|
|
|
|
}
|