Table of Contents

Class CreatePage<TInfo, TRedirectPage>

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

Represents page used to create objects.

[UIEvaluatePermission("Create")]
public abstract class CreatePage<TInfo, TRedirectPage> : InfoEditPageBase<TInfo>, IPage where TInfo : AbstractInfoBase<TInfo>, new()

Type Parameters

TInfo

Info object

TRedirectPage

Page used to redirect after successful object creation

Inheritance
object
CreatePage<TInfo, TRedirectPage>
Implements
Derived
Inherited Members
Extension Methods

Constructors

CreatePage(IFormComponentMapper, IFormDataBinder, IPageLinkGenerator)

Initializes a new instance of the CreatePage<TInfo, TRedirectPage> class.

protected CreatePage(IFormComponentMapper formComponentMapper, IFormDataBinder formDataBinder, IPageLinkGenerator pageLinkGenerator)

Parameters

formComponentMapper IFormComponentMapper
formDataBinder IFormDataBinder
pageLinkGenerator IPageLinkGenerator

CreatePage(IFormComponentMapper, IFormDataBinder, IPageUrlGenerator)

Initializes a new instance of the CreatePage<TInfo, TRedirectPage> class.

[Obsolete("Constructor is deprecated and will be removed in next version. Use CreatePage(IFormComponentMapper formComponentMapper, IFormDataBinder formDataBinder, IPageLinkGenerator pageLinkGenerator) instead.")]
[ObsoleteSince(29, 5)]
protected CreatePage(IFormComponentMapper formComponentMapper, IFormDataBinder formDataBinder, IPageUrlGenerator pageUrlGenerator)

Parameters

formComponentMapper IFormComponentMapper
formDataBinder IFormDataBinder
pageUrlGenerator IPageUrlGenerator

Fields

pageLinkGenerator

Page link generator.

protected readonly IPageLinkGenerator pageLinkGenerator

Field Value

IPageLinkGenerator

pageUrlGenerator

Page URL generator.

[Obsolete("Use pageLinkGenerator instead.")]
[ObsoleteSince(29, 5)]
protected readonly IPageUrlGenerator pageUrlGenerator

Field Value

IPageUrlGenerator

Properties

AdditionalLinkParameters

Collection of link parameters used for GetPath(Type, PageParameterValues) method.

protected PageParameterValues AdditionalLinkParameters { get; }

Property Value

PageParameterValues

AdditionalUrlParameters

Collection of URL parameters used for GenerateUrl(Type, params string[]) method.

[Obsolete("Use AdditionalLinkParameters instead.")]
[ObsoleteSince(29, 5)]
protected IList<string> AdditionalUrlParameters { get; }

Property Value

IList<string>

Methods

Change(FormChangeCommandArguments)

Handles the form change command. The command is invoked whenever visibility conditions of the form need to be reevaluated to re-render the form.

public override Task<ICommandResponse<FormChangeResult>> Change(FormChangeCommandArguments args)

Parameters

args FormChangeCommandArguments

Form change arguments.

Returns

Task<ICommandResponse<FormChangeResult>>

Returns the form change result.

ConfigurePage()

Set up page's configuration. Configures UI page.

public override Task ConfigurePage()

Returns

Task

ConfigureTemplateProperties(EditTemplateClientProperties)

Transforms the configuration to template properties.

public override Task<EditTemplateClientProperties> ConfigureTemplateProperties(EditTemplateClientProperties properties)

Parameters

properties EditTemplateClientProperties

Returns

Task<EditTemplateClientProperties>

Remarks

Performs also permission evaluation.

GetDefaultUIFormName()

Returns default UI form name.

protected override string GetDefaultUIFormName()

Returns

string

GetInfoObject(CancellationToken?)

Gets info object.

protected override Task<TInfo> GetInfoObject(CancellationToken? cancellationToken = null)

Parameters

cancellationToken CancellationToken?

The cancellation instruction.

Returns

Task<TInfo>

GetSubmitSuccessResponse(int)

Response that has to be returned after successful form submission.

protected Task<ICommandResponse> GetSubmitSuccessResponse(int objectId)

Parameters

objectId int

Object identifier.

Returns

Task<ICommandResponse>

GetSubmitSuccessResponse(TInfo, ICollection<IFormItem>)

Response that has to be returned after successful form submission.

protected override Task<ICommandResponse> GetSubmitSuccessResponse(TInfo savedInfoObject, ICollection<IFormItem> items)

Parameters

savedInfoObject TInfo

Object info after persisting.

items ICollection<IFormItem>

Collection with updated form items.

Returns

Task<ICommandResponse>

Submit(FormSubmissionCommandArguments)

Handles the form submit command.

public override Task<ICommandResponse> Submit(FormSubmissionCommandArguments args)

Parameters

args FormSubmissionCommandArguments

Form submission arguments.

Returns

Task<ICommandResponse>

Returns the form submission result.

Remarks

See Also