Class CreatePage<TInfo, TRedirectPage>
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
-
objectInfoEditPageBase<TInfo>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
IFormComponentMapperformDataBinder
IFormDataBinderpageLinkGenerator
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
IFormComponentMapperformDataBinder
IFormDataBinderpageUrlGenerator
IPageUrlGenerator
Fields
pageLinkGenerator
Page link generator.
protected readonly IPageLinkGenerator pageLinkGenerator
Field Value
pageUrlGenerator
Page URL generator.
[Obsolete("Use pageLinkGenerator instead.")]
[ObsoleteSince(29, 5)]
protected readonly IPageUrlGenerator pageUrlGenerator
Field Value
Properties
AdditionalLinkParameters
Collection of link parameters used for GetPath(Type, PageParameterValues) method.
protected PageParameterValues AdditionalLinkParameters { get; }
Property Value
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
FormChangeCommandArgumentsForm 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
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
intObject 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
TInfoObject 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
FormSubmissionCommandArgumentsForm submission arguments.
Returns
- Task<ICommandResponse>
Returns the form submission result.
Remarks
The default implementation calls the SubmitInternal(FormSubmissionCommandArguments, ICollection<IFormItem>, IFormFieldValueProvider) method.
- See Also