DataWeb
Search Results for

    Show / Hide Table of Contents

    Class Slug

    Inheritance
    object
    Control
    Slug
    Inherited Members
    Control.serviceProvider
    Control.form
    Control.Name
    Control.Type
    Control.Group
    Control.Title
    Control.DataField
    Control.DataSubField
    Control.DataType
    Control.DataSourceMode
    Control.DataSource
    Control.IsLateDataBinding
    Control.DefaultValueMode
    Control.DefaultValue
    Control.IsVisible
    Control.IsRequired
    Control.IsReadOnly
    Control.IsVersionLinked
    Control.IsLocalization
    Control.RegularExpression
    Control.MaxLength
    Control.StylePath
    Control.FormName
    Control.ListControlNames
    Control.FileTagName
    Control.FileTypes
    Control.FileMaxSize
    Control.FileMaxCount
    Control.CustomControlComponent
    Control.CustomControlOptions
    Control.ControlClass
    Control.IsVisibleRoles
    Control.VisibleRoles
    Control.Actions
    Control.Events
    Control.InitAsync(CancellationToken)
    Control.GetDefaultValueAsync(IUser, string, NavigationContext, CancellationToken)
    Control.ProcessOnGetValueAsync(object, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
    Control.GetListValuesAsync(Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
    Control.ProcessOnSaveDataAsync(object, List<Form.ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
    Control.IsUpdateDataAsync(object, List<Form.ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
    Control.ProcessActionAsync(ContextAction, IUser, string, object, List<Form.ProvidedValue>, NavigationContext, CancellationToken)
    Control.GetControlDefaultValue()
    Control.ValidateControlIsRequired(object)
    Control.ValidateControlDataType(object)
    Control.SanitizeControlValue(object)
    Control.AddActionUpdateData()
    Control.AddActionSetNavigation(string, List<ContextAction.Step>)
    Control.AddActionSetNavigation(string, ContextAction.Step, List<ContextAction.Step>)
    Control.AddActionSetRemoteAction(string, string, ContextActionType, string, bool, bool, bool)
    Control.AddActionSetLocalAction(string, string, ContextActionType)
    Control.AddEventSetIsVisible(EventCondition, List<string>, List<string>, bool)
    Control.AddEventSetIsRequired(EventCondition, List<string>, List<string>)
    Control.AddEventSetDataSourceParameter(List<string>, List<string>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Data.Controls
    Assembly: DataWeb.Core.dll
    Syntax
    public class Slug : Control

    Constructors

    Slug(Form, IServiceProvider)

    Declaration
    public Slug(Form form, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    Form form
    IServiceProvider serviceProvider

    Methods

    ProcessOnTranslateAsync(object, Dictionary<string, string>, Dictionary<string, object>, string, string, IUser, string, NavigationContext, CancellationToken)

    Processes the control value during a translation operation. Override to apply culture-specific transformations. The base implementation returns the value unchanged.

    Declaration
    public override Task<object> ProcessOnTranslateAsync(object value, Dictionary<string, string> translatedValues, Dictionary<string, object> sectionData, string culture, string sourceCulture, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    object value

    The value to process.

    Dictionary<string, string> translatedValues

    A dictionary of already-translated values keyed by field name.

    Dictionary<string, object> sectionData

    The section data associated with the current item.

    string culture

    The target culture (e.g. it-IT).

    string sourceCulture

    The source culture from which the translation originates.

    IUser user

    The IUser performing the translation.

    string itemId

    The Id of the item being translated, if applicable.

    NavigationContext navigationContext

    The NavigationContext, if applicable.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<object>

    A task that represents the asynchronous operation and returns the processed value.

    Overrides
    Control.ProcessOnTranslateAsync(object, Dictionary<string, string>, Dictionary<string, object>, string, string, IUser, string, NavigationContext, CancellationToken)

    ValidateAsync(object, List<ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)

    Validates the control value asynchronously. The base implementation checks whether the control is required (via ValidateControlIsRequired(object)) and whether the value matches the declared DataType (via ValidateControlDataType(object)).

    Declaration
    public override Task<List<ValidationError>> ValidateAsync(object value, List<Form.ProvidedValue> providedValues, Dictionary<string, object> sectionData, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    object value

    The value of the control to validate.

    List<Form.ProvidedValue> providedValues

    All values provided for the form submission.

    Dictionary<string, object> sectionData

    The section data associated with the current item.

    IUser user

    The IUser submitting the form.

    string itemId

    The Id of the item being edited, or null when adding a new item.

    NavigationContext navigationContext

    The NavigationContext of the form, if applicable.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<List<ValidationError>>

    A task that represents the asynchronous operation and returns the list of validation errors, if any.

    Overrides
    Control.ValidateAsync(object, List<Form.ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)

    Extension Methods

    FormMapperExtension.ToControlInfo(Control, Dictionary<string, object>, Dictionary<string, object>)
    In this article
    Back to top Generated by DocFX