Table of Contents

Class InfoBindingPage<TBindingObjectInfo, TTargetObjectInfo>

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

Base page for creating and listing bindings between two info objects.

public abstract class InfoBindingPage<TBindingObjectInfo, TTargetObjectInfo> : BindingPageBase<int, InfoBindingPageConfiguration, InfoObjectListingConfiguration>, IPage where TBindingObjectInfo : BaseInfo, new() where TTargetObjectInfo : BaseInfo, new()

Type Parameters

TBindingObjectInfo

Binding object info.

TTargetObjectInfo

Target object info which will be available for selection in the side panel.

Inheritance
object
InfoBindingPage<TBindingObjectInfo, TTargetObjectInfo>
Implements
Derived
Inherited Members
Extension Methods

Properties

RemoveBindingButtonResourceKey

Resource key for tooltip of the button removing a binding.

protected virtual string RemoveBindingButtonResourceKey { get; }

Property Value

string

SourceBindingColumn

Column name of the binding object info that is reference to source object info identifier.

protected abstract string SourceBindingColumn { get; }

Property Value

string

TargetBindingColumn

Column name of the binding object info that is reference to target object info identifier.

protected abstract string TargetBindingColumn { get; }

Property Value

string

Methods

ConfigurePage()

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

public override Task ConfigurePage()

Returns

Task

GetSelectedIdentifiers(CancellationToken)

Gets the selected identifiers.

protected override Task<ICollection<int>> GetSelectedIdentifiers(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ICollection<int>>

LoadExistingBindingsInternal(LoadDataCommandArguments, CancellationToken)

Load existing bindings.

protected override Task<LoadDataResult> LoadExistingBindingsInternal(LoadDataCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args LoadDataCommandArguments

Load data arguments.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<LoadDataResult>

LoadSidePanelDataInternal(LoadDataCommandArguments, CancellationToken)

Load items eligible for selection in the binding side panel.

protected override Task<LoadDataResult> LoadSidePanelDataInternal(LoadDataCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args LoadDataCommandArguments

Load data arguments.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<LoadDataResult>

RemoveBinding(int)

Removes the binding record.

public virtual Task<ICommandResponse<RowActionResult>> RemoveBinding(int bindingId)

Parameters

bindingId int

Id of the binding record to be removed.

Returns

Task<ICommandResponse<RowActionResult>>

SetBindingsInternal(SetBindingsCommandArguments<int>, CancellationToken)

Sets the current bindings.

protected override Task SetBindingsInternal(SetBindingsCommandArguments<int> args, CancellationToken cancellationToken = default)

Parameters

args SetBindingsCommandArguments<int>

Set bindings arguments.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

Remarks

If adding or removing of any binding record fails, the whole operation is cancelled.

ValidateBindings(ICollection<int>)

Validates the bindings received from the template. Returns true if bindings satisfy all requirements, otherwise false.

protected override bool ValidateBindings(ICollection<int> identifiers)

Parameters

identifiers ICollection<int>

Returns

bool