Table of Contents

Class JJDataPanel

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

Render panels with fields

public class JJDataPanel : AsyncComponent
Inheritance
JJDataPanel
Inherited Members

Constructors

JJDataPanel(IEntityRepository, IHttpContext, IEncryptionService, FieldFormattingService, FieldValidationService, FormValuesService, ExpressionsService, UrlRedirectService, IStringLocalizer<MasterDataResources>, IComponentFactory)

public JJDataPanel(IEntityRepository entityRepository, IHttpContext currentContext, IEncryptionService encryptionService, FieldFormattingService fieldFormattingService, FieldValidationService fieldValidationService, FormValuesService formValuesService, ExpressionsService expressionsService, UrlRedirectService urlRedirectService, IStringLocalizer<MasterDataResources> stringLocalizer, IComponentFactory componentFactory)

Parameters

entityRepository IEntityRepository
currentContext IHttpContext
encryptionService IEncryptionService
fieldFormattingService FieldFormattingService
fieldValidationService FieldValidationService
formValuesService FormValuesService
expressionsService ExpressionsService
urlRedirectService UrlRedirectService
stringLocalizer IStringLocalizer<MasterDataResources>
componentFactory IComponentFactory

JJDataPanel(FormElement, IEntityRepository, IHttpContext, IEncryptionService, FieldFormattingService, FieldValidationService, FormValuesService, ExpressionsService, UrlRedirectService, IStringLocalizer<MasterDataResources>, IComponentFactory)

public JJDataPanel(FormElement formElement, IEntityRepository entityRepository, IHttpContext currentContext, IEncryptionService encryptionService, FieldFormattingService fieldFormattingService, FieldValidationService fieldValidationService, FormValuesService formValuesService, ExpressionsService expressionsService, UrlRedirectService urlRedirectService, IStringLocalizer<MasterDataResources> stringLocalizer, IComponentFactory componentFactory)

Parameters

formElement FormElement
entityRepository IEntityRepository
currentContext IHttpContext
encryptionService IEncryptionService
fieldFormattingService FieldFormattingService
fieldValidationService FieldValidationService
formValuesService FormValuesService
expressionsService ExpressionsService
urlRedirectService UrlRedirectService
stringLocalizer IStringLocalizer<MasterDataResources>
componentFactory IComponentFactory

Properties

AutoReloadFormFields

When reloading the panel, keep the values entered in the form (Default=True)

public bool AutoReloadFormFields { get; set; }

Property Value

bool

EntityRepository

public IEntityRepository EntityRepository { get; }

Property Value

IEntityRepository

Errors

Fields with error. Key=Field Name, Value=Error Description

public Dictionary<string, string> Errors { get; set; }

Property Value

Dictionary<string, string>

FieldNamePrefix

public string FieldNamePrefix { get; set; }

Property Value

string

FormElement

Predefined form settings

public FormElement FormElement { get; set; }

Property Value

FormElement

FormUI

Layout form settings

public FormUI FormUI { get; }

Property Value

FormUI

IsAtModal

public bool IsAtModal { get; set; }

Property Value

bool

PageState

Current state of the form

public PageState PageState { get; set; }

Property Value

PageState

ParentComponentName

[CanBeNull]
public string ParentComponentName { get; set; }

Property Value

string

SecretValues

Values not intended to be edited at the client. They are encrypted using IEncryptionService.

[CanBeNull]
public Dictionary<string, object> SecretValues { get; set; }

Property Value

Dictionary<string, object>

Values

Field Values. Key=Field Name, Value=Field Value

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

Property Value

Dictionary<string, object>

Methods

BuildResultAsync()

protected override Task<ComponentResult> BuildResultAsync()

Returns

Task<ComponentResult>

GetFormValues()

[Obsolete("Please use GetFormValuesAsync")]
public Dictionary<string, object> GetFormValues()

Returns

Dictionary<string, object>

GetFormValuesAsync()

Load form data with default values and triggers

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

Returns

Task<Dictionary<string, object>>

LoadValuesFromPK(Dictionary<string, object>)

[Obsolete("Async methods allow the app to do other tasks while waiting for Db and/or IO operations to complete. Please use Please use LoadValuesFromPkAsync")]
public void LoadValuesFromPK(Dictionary<string, object> pks)

Parameters

pks Dictionary<string, object>

LoadValuesFromPkAsync(Dictionary<string, object>)

public Task LoadValuesFromPkAsync(Dictionary<string, object> pks)

Parameters

pks Dictionary<string, object>

Returns

Task

LoadValuesFromPkAsync(params object[])

public Task LoadValuesFromPkAsync(params object[] pks)

Parameters

pks object[]

Returns

Task

ValidateFields(Dictionary<string, object>)

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

Parameters

values Dictionary<string, object>

Returns

Dictionary<string, string>

ValidateFields(Dictionary<string, object>, PageState, bool)

Validate form fields and return a list with errors

public Dictionary<string, string> ValidateFields(Dictionary<string, object> values, PageState pageState, bool enableErrorLink = true)

Parameters

values Dictionary<string, object>
pageState PageState
enableErrorLink bool

Returns

Dictionary<string, string>

Key = Field Name Valor = Error message