Table of Contents

Class FormElementField

Namespace
JJMasterData.Core.DataDictionary.Models
Assembly
JJMasterData.Core.dll

Field-specific information in the form, inherits from ElementField

public class FormElementField : ElementField
Inheritance
FormElementField
Inherited Members

Remarks

2017-03-22 JJTeam

Constructors

FormElementField()

public FormElementField()

FormElementField(ElementField)

public FormElementField(ElementField elementField)

Parameters

elementField ElementField

Fields

AutocompletePickerAttribute

public const string AutocompletePickerAttribute = "autocompletePicker"

Field Value

string

CultureInfoAttribute

public const string CultureInfoAttribute = "culture-info"

Field Value

string

IsSwitchAttribute

public const string IsSwitchAttribute = "is-switch"

Field Value

string

MaxValueAttribute

public const string MaxValueAttribute = "max"

Field Value

string

MinValueAttribute

public const string MinValueAttribute = "min"

Field Value

string

PlaceholderAttribute

public const string PlaceholderAttribute = "placeholder"

Field Value

string

PopUpSizeAttribute

public const string PopUpSizeAttribute = "popupsize"

Field Value

string

PopUpTitleAttribute

public const string PopUpTitleAttribute = "popuptitle"

Field Value

string

RowsAttribute

public const string RowsAttribute = "rows"

Field Value

string

StepAttribute

public const string StepAttribute = "step"

Field Value

string

Properties

Actions

[JsonProperty("actions")]
public FormElementFieldActionList Actions { get; set; }

Property Value

FormElementFieldActionList

Attributes

Collection of arbitrary (rendering-only) attributes that do not match control properties

[JsonProperty("attributes")]
public Dictionary<string, object?> Attributes { get; set; }

Property Value

Dictionary<string, object>

AutoPostBack

Ao alterar o conteúdo recarrega todos os campos do formulário (Default=false)

[JsonProperty("autoPostBack")]
[Display(Name = "Auto Reload")]
public bool AutoPostBack { get; set; }

Property Value

bool

Remarks

Normalmente utilizado para atualizar componente combobox ou searchbox que utilizam um valor do formulário como referência na query.

Exemplo: "SELECT ID, DESCR FROM TB_FOO WHERE TPVEND = {campo_tpvend}"

Component

[JsonProperty("component")]
[Display(Name = "Component")]
public FormComponent Component { get; set; }

Property Value

FormComponent

CssClass

Class name (CSS) to be appended in object group rendering

[JsonProperty("cssClass")]
[Display(Name = "CSS Class")]
public string? CssClass { get; set; }

Property Value

string

DataFile

File-specific settings

[JsonProperty("dataFile")]
public FormElementDataFile? DataFile { get; set; }

Property Value

FormElementDataFile

DataItem

Relationship specific settings

[JsonProperty("dataItem")]
public FormElementDataItem? DataItem { get; set; }

Property Value

FormElementDataItem

EnableExpression

[JsonProperty("enableExpression")]
[Display(Name = "Enable Expression")]
public string EnableExpression { get; set; }

Property Value

string

Remarks

EncodeHtml

[JsonProperty("encodeHtml")]
[Display(Name = "Encode HTML")]
public bool EncodeHtml { get; set; }

Property Value

bool

Export

Allows exporting the field (Default=true)

[JsonProperty("export")]
[Display(Name = "Enable Exportation")]
public bool Export { get; set; }

Property Value

bool

GridAlignment

[JsonProperty("gridAlignment")]
[Display(Name = "Alignment At Grid")]
public GridAlignment GridAlignment { get; set; }

Property Value

GridAlignment

GridRenderingTemplate

Template used to render the field at the Grid.

[LanguageInjection("html")]
[JsonProperty("gridRenderingTemplate")]
[Display(Name = "Rendering Template")]
public string? GridRenderingTemplate { get; set; }

Property Value

string

HelpDescription

Help text will be displayed next to the label

[JsonProperty("helpDescription")]
[Display(Name = "Tooltip")]
public string? HelpDescription { get; set; }

Property Value

string

InternalNotes

Internal developer notes

[JsonProperty("internalNotes")]
public string? InternalNotes { get; set; }

Property Value

string

LineGroup

Line counter, used to break the line in the form (row class)

[JsonProperty("lineGroup")]
[Display(Name = "Line Group")]
public int LineGroup { get; set; }

Property Value

int

Remarks

Used to manually specify the size of fields on the form Example:

//This field is in line 1 
FormElementField f1 = FormElement.Fields["fieldname1"];
f1.LineGroup = 1;
f1.CssClass = "col-sm-12";

//This field is in line 2
FormElementField f2 = FormElement.Fields["fieldname2"];
f2.LineGroup = 2;
f2.CssClass = "col-sm-6";

//This field is in line 2
FormElementField f3 = FormElement.Fields["fieldname3"];
f3.LineGroup = 2;
f3.CssClass = "col-sm-6";

NumberOfDecimalPlaces

Number of decimal places. The default value is 0.

[JsonProperty("numberOfDecimalPlaces")]
[Display(Name = "Number of Decimal Places")]
public int NumberOfDecimalPlaces { get; set; }

Property Value

int

Remarks

Property valid only for numeric types

PanelId

This id references a FormElementPanel

[JsonProperty("panelId")]
public int PanelId { get; set; }

Property Value

int

ReadOnlyExpression

The field will be disabled but the value send to the server

[JsonIgnore]
public string? ReadOnlyExpression { get; set; }

Property Value

string

TriggerExpression

[JsonProperty("triggerExpression")]
[Display(Name = "Trigger Expression")]
public string? TriggerExpression { get; set; }

Property Value

string

Remarks

ValidateRequest

Validates possibly dangerous values in the request for .NET Framework

[JsonProperty("validateRequest")]
[Display(Name = "Validate Request")]
public bool ValidateRequest { get; set; }

Property Value

bool

Remarks

Important for lower versions of .NET Framework to enable the parameter: httpRuntime requestValidationMode="4.5" ...

VisibleExpression

[JsonProperty("visibleExpression")]
[Display(Name = "Visible Expression")]
public string VisibleExpression { get; set; }

Property Value

string

Remarks

Methods

DeepCopy()

public FormElementField DeepCopy()

Returns

FormElementField

GetAttr(string)

public object? GetAttr(string key)

Parameters

key string

Returns

object

SetAttr(string, object)

public void SetAttr(string key, object value)

Parameters

key string
value object

SetEnabled(bool)

Set if the field is enabled.

public void SetEnabled(bool value)

Parameters

value bool

SetReadOnly(bool)

Set if the field is enabled.

public void SetReadOnly(bool value)

Parameters

value bool

SetVisible(bool)

Set field visibility

public void SetVisible(bool value)

Parameters

value bool

SupportsFloatingLabel()

public bool SupportsFloatingLabel()

Returns

bool