Table of Contents

Class ListingPage<TClientProperties>

Namespace
Kentico.Xperience.Admin.Base
Assembly
Kentico.Xperience.Admin.Base.dll

Listing page for info objects.

public abstract class ListingPage<TClientProperties> : ListingPageBase<InfoObjectListingConfiguration, TClientProperties>, IPage where TClientProperties : ListingTemplateClientProperties, new()

Type Parameters

TClientProperties
Inheritance
object
Page<TClientProperties>
ListingPage<TClientProperties>
Implements
Derived
Inherited Members
Extension Methods

Remarks

Automatically adds IdColumn into the table column list (the id column is not visible in the table).

Constructors

ListingPage()

protected ListingPage()

Properties

IdColumn

Name of the column which is as an identifier of the listed objects.

protected virtual string IdColumn { get; }

Property Value

string

ObjectType

Type of the info objects that are listed. Corresponds to the OBJECT_TYPE property of the info object or PredefinedObjectType.

protected abstract string ObjectType { get; }

Property Value

string

PageConfiguration

Page configuration.

public override InfoObjectListingConfiguration PageConfiguration { get; set; }

Property Value

InfoObjectListingConfiguration

RefetchAllOnDelete

Indicates whether to refetch all templates on delete.

protected virtual bool RefetchAllOnDelete { get; }

Property Value

bool

Methods

ConfigurePage()

Allows configure and share page specific values prior invocation of the ConfigureTemplateProperties(TClientProperties) or command method.

public override Task ConfigurePage()

Returns

Task

Delete(int)

Deletes listing item specified by the id parameter.

public virtual Task<ICommandResponse<RowActionResult>> Delete(int id)

Parameters

id int

Returns

Task<ICommandResponse<RowActionResult>>

GetIdentifier(IDataContainer)

Gets the identifier for listing item.

protected virtual object GetIdentifier(IDataContainer dataRecord)

Parameters

dataRecord IDataContainer

Listing item.

Returns

object

GetQuerySource()

Returns the query used as source for data.

protected virtual Task<ObjectQuery> GetQuerySource()

Returns

Task<ObjectQuery>

Query used as source for data.

GetRowsFromData(IEnumerable<IDataContainer>, CancellationToken)

Transforms the data loaded by LoadListingDataContainers(ListingDataSettings, CancellationToken) into a collection of rows for the table of the listing page.

protected Task<IEnumerable<Row>> GetRowsFromData(IEnumerable<IDataContainer> dataContainers, CancellationToken cancellationToken)

Parameters

dataContainers IEnumerable<IDataContainer>

Data of the rows.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IEnumerable<Row>>

LoadData(LoadDataSettings, CancellationToken)

Returns LoadDataResult containing data and the number of total items.

protected override Task<LoadDataResult> LoadData(LoadDataSettings settings, CancellationToken cancellationToken)

Parameters

settings LoadDataSettings

Load data settings.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<LoadDataResult>

LoadListingDataContainers(ListingDataSettings, CancellationToken)

Loads the listing data (data containers and their total count) described by the settings from the object query returned by GetQuerySource(), applying the QueryModifiers.

protected virtual Task<ListingData> LoadListingDataContainers(ListingDataSettings settings, CancellationToken cancellationToken)

Parameters

settings ListingDataSettings

Description of the data to load.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ListingData>

Remarks

This is the data primitive of the listing page serving both the table and the export. Unlike LoadData(LoadDataSettings, CancellationToken), which returns the rows of a single table page, this method returns the raw data: the table rows are generated from the paginated data, and the export is built from the first page sized by the export row limit.