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)
Render panels with fields
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
IEntityRepositorycurrentContext
IHttpContextencryptionService
IEncryptionServicefieldFormattingService
FieldFormattingServicefieldValidationService
FieldValidationServiceformValuesService
FormValuesServiceexpressionsService
ExpressionsServiceurlRedirectService
UrlRedirectServicestringLocalizer
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
FormElemententityRepository
IEntityRepositorycurrentContext
IHttpContextencryptionService
IEncryptionServicefieldFormattingService
FieldFormattingServicefieldValidationService
FieldValidationServiceformValuesService
FormValuesServiceexpressionsService
ExpressionsServiceurlRedirectService
UrlRedirectServicestringLocalizer
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
Errors
Fields with error. Key=Field Name, Value=Error Description
public Dictionary<string, string> Errors { get; set; }
Property Value
FieldNamePrefix
public string FieldNamePrefix { get; set; }
Property Value
FormElement
Predefined form settings
public FormElement FormElement { get; set; }
Property Value
FormUI
Layout form settings
public FormUI FormUI { get; }
Property Value
IsAtModal
public bool IsAtModal { get; set; }
Property Value
PageState
Current state of the form
public PageState PageState { get; set; }
Property Value
ParentComponentName
[CanBeNull]
public string ParentComponentName { get; set; }
Property Value
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
Values
Field Values. Key=Field Name, Value=Field Value
public Dictionary<string, object> Values { get; set; }
Property Value
Methods
BuildResultAsync()
protected override Task<ComponentResult> BuildResultAsync()
Returns
GetFormValues()
[Obsolete("Please use GetFormValuesAsync")]
public Dictionary<string, object> GetFormValues()
Returns
GetFormValuesAsync()
Load form data with default values and triggers
public Task<Dictionary<string, object>> GetFormValuesAsync()
Returns
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
LoadValuesFromPkAsync(params object[])
public Task LoadValuesFromPkAsync(params object[] pks)
Parameters
pks
object[]
Returns
ValidateFields(Dictionary<string, object>)
public Dictionary<string, string> ValidateFields(Dictionary<string, object> values)
Parameters
values
Dictionary<string, object>
Returns
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
PageStateenableErrorLink
bool
Returns
- Dictionary<string, string>
Key = Field Name Valor = Error message