Table of Contents

Class JJFormView

Namespace
JJMasterData.Core.UI.Components
Assembly
JJMasterData.Core.dll

Represents a CRUD.

public class JJFormView : AsyncComponent
Inheritance
JJFormView
Inherited Members

Examples

Warning

It looks like the sample you are looking for does not exist.

The GetHtml method will return something like this:

Constructors

JJFormView(FormElement, IHttpContext, IEntityRepository, IDataDictionaryRepository, FormService, IEncryptionService, FormValuesService, FieldValuesService, ExpressionsService, HtmlTemplateService, IEnumerable<IPluginHandler>, IOptionsSnapshot<MasterDataCoreOptions>, IStringLocalizer<MasterDataResources>, ILogger<JJFormView>, IComponentFactory)

public JJFormView(FormElement formElement, IHttpContext currentContext, IEntityRepository entityRepository, IDataDictionaryRepository dataDictionaryRepository, FormService formService, IEncryptionService encryptionService, FormValuesService formValuesService, FieldValuesService fieldValuesService, ExpressionsService expressionsService, HtmlTemplateService htmlTemplateService, IEnumerable<IPluginHandler> pluginHandlers, IOptionsSnapshot<MasterDataCoreOptions> options, IStringLocalizer<MasterDataResources> stringLocalizer, ILogger<JJFormView> logger, IComponentFactory componentFactory)

Parameters

formElement FormElement
currentContext IHttpContext
entityRepository IEntityRepository
dataDictionaryRepository IDataDictionaryRepository
formService FormService
encryptionService IEncryptionService
formValuesService FormValuesService
fieldValuesService FieldValuesService
expressionsService ExpressionsService
htmlTemplateService HtmlTemplateService
pluginHandlers IEnumerable<IPluginHandler>
options IOptionsSnapshot<MasterDataCoreOptions>
stringLocalizer IStringLocalizer<MasterDataResources>
logger ILogger<JJFormView>
componentFactory IComponentFactory

Properties

DataImportation

Configurações de importação

public JJDataImportation DataImportation { get; }

Property Value

JJDataImportation

DataPanel

public JJDataPanel DataPanel { get; }

Property Value

JJDataPanel

FormElement

public FormElement FormElement { get; }

Property Value

FormElement

GridView

public JJGridView GridView { get; }

Property Value

JJGridView

PageState

public PageState PageState { get; }

Property Value

PageState

RelationValues

Values to be replaced by relationship. If the field name exists in the relationship, the value will be replaced

public Dictionary<string, object> RelationValues { get; set; }

Property Value

Dictionary<string, object>

Remarks

Key = Field name, Value=Field value

RouteContext

public RouteContext RouteContext { get; }

Property Value

RouteContext

ShowTitle

public bool ShowTitle { get; set; }

Property Value

bool

TitleActions

public List<TitleAction>? TitleActions { get; set; }

Property Value

List<TitleAction>

Methods

AddFormEventHandler(IFormEventHandler?)

public void AddFormEventHandler(IFormEventHandler? formEventHandler)

Parameters

formEventHandler IFormEventHandler

BuildResultAsync()

protected override Task<ComponentResult> BuildResultAsync()

Returns

Task<ComponentResult>

DeleteFormValuesAsync(Dictionary<string, object?>?)

public Task<Dictionary<string, string>> DeleteFormValuesAsync(Dictionary<string, object?>? filter)

Parameters

filter Dictionary<string, object>

Returns

Task<Dictionary<string, string>>

GetActionContext(BasicAction, FormStateData, string?)

public ActionContext GetActionContext(BasicAction action, FormStateData formStateData, string? fieldName = null)

Parameters

action BasicAction
formStateData FormStateData
fieldName string

Returns

ActionContext

GetFormStateDataAsync()

public ValueTask<FormStateData> GetFormStateDataAsync()

Returns

ValueTask<FormStateData>

GetFormStateDataAsync(bool)

public ValueTask<FormStateData> GetFormStateDataAsync(bool reloadFormFields)

Parameters

reloadFormFields bool

Returns

ValueTask<FormStateData>

GetFormValuesAsync()

public Task<Dictionary<string, object?>> GetFormValuesAsync()

Returns

Task<Dictionary<string, object>>

GetRelationValuesFromForm()

public Dictionary<string, object> GetRelationValuesFromForm()

Returns

Dictionary<string, object>

InsertFormValuesAsync(Dictionary<string, object?>, bool)

Insert the records in the database.

public Task<Dictionary<string, string>> InsertFormValuesAsync(Dictionary<string, object?> values, bool validateFields = true)

Parameters

values Dictionary<string, object>
validateFields bool

Returns

Task<Dictionary<string, string>>

The list of errors.

UpdateFormValuesAsync(Dictionary<string, object?>)

Update the records in the database.

public Task<Dictionary<string, string>> UpdateFormValuesAsync(Dictionary<string, object?> values)

Parameters

values Dictionary<string, object>

Returns

Task<Dictionary<string, string>>

The list of errors.

ValidateFields(Dictionary<string, object>, PageState)

public Dictionary<string, string> ValidateFields(Dictionary<string, object> values, PageState pageState)

Parameters

values Dictionary<string, object>
pageState PageState

Returns

Dictionary<string, string>

Events

OnAfterDeleteAsync

public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterDeleteAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnAfterInsertAsync

public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterInsertAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnAfterUpdateAsync

public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterUpdateAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnBeforeDeleteAsync

public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeDeleteAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeImportAsync

public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeImportAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeInsertAsync

public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeInsertAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeUpdateAsync

public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeUpdateAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

Operators

implicit operator JJDataPanel(JJFormView)

public static implicit operator JJDataPanel(JJFormView formView)

Parameters

formView JJFormView

Returns

JJDataPanel

implicit operator JJGridView(JJFormView)

public static implicit operator JJGridView(JJFormView formView)

Parameters

formView JJFormView

Returns

JJGridView