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
FormElementcurrentContext
IHttpContextentityRepository
IEntityRepositorydataDictionaryRepository
IDataDictionaryRepositoryformService
FormServiceencryptionService
IEncryptionServiceformValuesService
FormValuesServicefieldValuesService
FieldValuesServiceexpressionsService
ExpressionsServicehtmlTemplateService
HtmlTemplateServicepluginHandlers
IEnumerable<IPluginHandler>options
IOptionsSnapshot<MasterDataCoreOptions>stringLocalizer
IStringLocalizer<MasterDataResources>logger
ILogger<JJFormView>componentFactory
IComponentFactory
Properties
CurrentSettings
[Obsolete("Please use GridView.CurrentSettings")]
public GridSettings CurrentSettings { get; set; }
Property Value
DataImportation
Configurações de importação
public JJDataImportation DataImportation { get; }
Property Value
DataPanel
public JJDataPanel DataPanel { get; }
Property Value
EnableEditMode
[Obsolete("Please use GridView.EnableEditMode")]
public bool EnableEditMode { get; set; }
Property Value
EnableFilter
[Obsolete("Please use GridView.EnableFilter")]
public bool EnableFilter { get; set; }
Property Value
EnableMultiSelect
[Obsolete("Please use GridView.EnableMultiSelect")]
public bool EnableMultiSelect { get; set; }
Property Value
ExportAction
[Obsolete("Please use GridView.ExportAction")]
public ExportAction ExportAction { get; }
Property Value
FormElement
public FormElement FormElement { get; }
Property Value
GridActions
[Obsolete("Please use GridView.GridActions")]
public GridTableActionList GridActions { get; }
Property Value
GridView
public JJGridView GridView { get; }
Property Value
PageState
public PageState PageState { get; }
Property Value
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
Remarks
Key = Field name, Value=Field value
RouteContext
public RouteContext RouteContext { get; }
Property Value
ShowTitle
public bool ShowTitle { get; set; }
Property Value
ShowToolbar
[Obsolete("Please use GridView.ShowToolbar")]
public bool ShowToolbar { get; set; }
Property Value
TitleActions
public List<TitleAction>? TitleActions { get; set; }
Property Value
ToolBarActions
[Obsolete("Please use GridView.ToolBarActions")]
public GridToolbarActionList ToolBarActions { get; }
Property Value
Methods
AddFormEventHandler(IFormEventHandler?)
public void AddFormEventHandler(IFormEventHandler? formEventHandler)
Parameters
formEventHandler
IFormEventHandler
BuildResultAsync()
protected override Task<ComponentResult> BuildResultAsync()
Returns
ClearSelectedGridValues()
[Obsolete("Please use GridView.ClearSelectedGridValues")]
public void ClearSelectedGridValues()
DeleteFormValuesAsync(Dictionary<string, object?>?)
public Task<Dictionary<string, string>> DeleteFormValuesAsync(Dictionary<string, object?>? filter)
Parameters
filter
Dictionary<string, object>
Returns
GetActionContext(BasicAction, FormStateData, string?)
public ActionContext GetActionContext(BasicAction action, FormStateData formStateData, string? fieldName = null)
Parameters
action
BasicActionformStateData
FormStateDatafieldName
string
Returns
GetFormStateDataAsync()
public ValueTask<FormStateData> GetFormStateDataAsync()
Returns
GetFormStateDataAsync(bool)
public ValueTask<FormStateData> GetFormStateDataAsync(bool reloadFormFields)
Parameters
reloadFormFields
bool
Returns
GetFormValuesAsync()
public Task<Dictionary<string, object?>> GetFormValuesAsync()
Returns
GetGridValues()
[Obsolete("Please use GridView.GetGridValuesAsync()")]
public List<Dictionary<string, object?>> GetGridValues()
Returns
GetRelationValuesFromForm()
public Dictionary<string, object> GetRelationValuesFromForm()
Returns
GetSelectedGridValues()
[Obsolete("Please use GridView.GetSelectedGridValues")]
public List<Dictionary<string, object>> GetSelectedGridValues()
Returns
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.
SetCurrentFilter(string, object)
[Obsolete("Please use GridView.SetCurrentFilter")]
public void SetCurrentFilter(string filterKey, object filterValue)
Parameters
SetGridOptions(GridUI)
[Obsolete("Please use GridView.SetGridOptions()")]
public void SetGridOptions(GridUI options)
Parameters
options
GridUI
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
Events
OnAfterDeleteAsync
public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterDeleteAsync
Event Type
OnAfterInsertAsync
public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterInsertAsync
Event Type
OnAfterUpdateAsync
public event AsyncEventHandler<FormAfterActionEventArgs>? OnAfterUpdateAsync
Event Type
OnBeforeDeleteAsync
public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeDeleteAsync
Event Type
OnBeforeImportAsync
public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeImportAsync
Event Type
OnBeforeInsertAsync
public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeInsertAsync
Event Type
OnBeforeUpdateAsync
public event AsyncEventHandler<FormBeforeActionEventArgs>? OnBeforeUpdateAsync
Event Type
Operators
implicit operator JJDataPanel(JJFormView)
public static implicit operator JJDataPanel(JJFormView formView)
Parameters
formView
JJFormView
Returns
implicit operator JJGridView(JJFormView)
public static implicit operator JJGridView(JJFormView formView)
Parameters
formView
JJFormView