Ext.NET  5.3.0
.NET Component Framework for Enterprise Level Apps
Ext.Net.Labelable Class Reference

More...

Inheritance diagram for Ext.Net.Labelable:
Ext.Net.BaseItem Ext.Net.IXObject Ext.Net.IBase

Classes

class  Builder
 
class  Config
 

Public Member Functions

 Labelable ()
 
 Labelable (BaseControl owner)
 
Labelable.Builder ToBuilder ()
 
override IControlBuilder ToNativeBuilder ()
 
 Labelable (Config config)
 
- Public Member Functions inherited from Ext.Net.BaseItem
virtual bool HasExplicitValue (string name)
 
void EnsureDataBind ()
 
virtual void Call (string name)
 
virtual void Call (string name, params object[] args)
 
virtual void AddScript (string script)
 
virtual void AddScript (string script, params object[] args)
 
virtual bool IsEmptyObject ()
 
Apply< T > (IApply config)
 
BaseItem Apply (object config)
 
virtual void LoadViewState (object state)
 
virtual object SaveViewState ()
 
virtual void TrackViewState ()
 
void SetDirty ()
 
virtual void DataBind ()
 

Static Public Member Functions

static implicit operator Labelable (Labelable.Config config)
 

Properties

virtual string ActiveError [get, set]
 If specified, then the component will be displayed with this value as its active error when first rendered. Defaults to undefined. Use setActiveError or unsetActiveError to change it after component creation. More...
 
virtual string ActiveErrorsTpl [get, set]
 The template used to format the Array of error messages passed to setActiveErrors into a single HTML string. By default this renders each message as an item in an unordered list. More...
 
virtual string AriaErrorText [get, set]
 Localized announcement text for validation errors. This text will be used by Assistive Technologies such as screen readers to alert the users when field validation fails. More...
 
virtual string AriaHelp [get, set]
 Optional text description for this object. This text will be announced to Assistive Technology users when the object is focused. More...
 
virtual bool AutoFitErrors [get, set]
 Whether to adjust the component's body area to make room for 'side' or 'under' error messages. Defaults to true. More...
 
virtual string BaseBodyCls [get, set]
 The CSS class to be applied to the body content element. Defaults to 'x-form-item-body'. More...
 
virtual string ClearCls [get, set]
 The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide field clearing (defaults to 'x-form-clear-left'). More...
 
virtual string DirtyCls [get, set]
 The CSS class to use when the field value is dirty. More...
 
virtual string ErrorMsgCls [get, set]
 The CSS class to be applied to the error message element. Defaults to 'x-form-error-msg'. More...
 
virtual string FieldBodyCls [get, set]
 An extra CSS class to be applied to the body content element in addition to fieldBodyCls. Defaults to empty. More...
 
virtual string FieldLabel [get, set]
 The label for the field. It gets appended with the labelSeparator, and its position and sizing is determined by the labelAlign, labelWidth, and labelPad configs. Defaults to undefined. More...
 
virtual string FocusCls [get, set]
 The CSS class to use when the field receives focus (defaults to 'x-form-focus') More...
 
virtual string FormItemCls [get, set]
 A CSS class to be applied to the outermost element to denote that it is participating in the form field layout. Defaults to 'x-form-item'. More...
 
virtual bool HideEmptyLabel [get, set]
 When set to true, the label element (fieldLabel and labelSeparator) will be automatically hidden if the fieldLabel is empty. Setting this to false will cause the empty label element to be rendered and space to be reserved for it; this is useful if you want a field without a label to line up with other labeled fields in the same form. Defaults to true. More...
 
virtual bool HideLabel [get, set]
 Set to true to completely hide the label element (fieldLabel and labelSeparator). Defaults to false. More...
 
virtual string InvalidCls [get, set]
 The CSS class to use when marking the component invalid (defaults to 'x-form-invalid') More...
 
virtual string InvalidText [get, set]
 The error text to use when marking a field invalid and no message is provided (defaults to 'The value in this field is invalid') More...
 
virtual LabelAlign LabelAlign [get, set]
 Controls the position and alignment of the fieldLabel. Valid values are: "left" (the default) - The label is positioned to the left of the field, with its text aligned to the left. Its width is determined by the labelWidth config. "top" - The label is positioned above the field. "right" - The label is positioned to the left of the field, with its text aligned to the right. Its width is determined by the labelWidth config. More...
 
virtual string LabelCls [get, set]
 The CSS class to be applied to the label element. Defaults to 'x-form-item-label'. This (single) CSS class is used to formulate the renderSelector and drives the field layout where it is concatenated with a hyphen ('-') and labelAlign. To add additional classes, use labelClsExtra. More...
 
virtual int LabelPad [get, set]
 The amount of space in pixels between the fieldLabel and the input field. Defaults to 5. More...
 
virtual string LabelSeparator [get, set]
 Character(s) to be inserted at the end of the label text. More...
 
virtual string LabelStyle [get, set]
 A CSS style specification string to apply directly to this field's label. Defaults to undefined. More...
 
virtual int LabelWidth [get, set]
 The width of the fieldLabel in pixels. Only applicable if the labelAlign is set to "left" or "right". Defaults to 100. More...
 
virtual MessageTarget MsgTarget [get, set]
 The location where the error message text should display. Must be one of the following values: More...
 
virtual string MsgTargetElement [get, set]
 Add the error message directly to the innerHTML of the specified element. More...
 
virtual bool PreventMark [get, set]
 true to disable displaying any error message set on this object. Defaults to false. More...
 
virtual bool ReadOnly [get, set]
 true to mark the field as readOnly in HTML (defaults to false). Note: this only sets the element's readOnly DOM attribute. Setting readOnly=true, for example, will not disable triggering a ComboBox or Date; it gives you the option of forcing the user to choose via the trigger without typing in the text box. To hide the trigger use hideTrigger. More...
 
virtual string ReadOnlyCls [get, set]
 The CSS class applied to the component's main element when it is readOnly. More...
 
virtual bool SubmitValue [get, set]
 Setting this to false will prevent the field from being submitted even when it is not disabled. Defaults to true. More...
 
virtual bool PreserveIndicatorIcon [get, set]
 Preserve indicator icon place. Defaults to false More...
 
virtual bool AllowBlank [get, set]
 False to validate that the value length > 0 (defaults to true). More...
 
virtual string BlankText [get, set]
 Error text to display if the allow blank validation fails (defaults to 'This field is required'). More...
 
virtual bool DisableKeyFilter [get, set]
 True to disable input keystroke filtering (defaults to false). More...
 
virtual string EmptyCls [get, set]
 The CSS class to apply to an empty field to style the emptyText (defaults to 'x-form-empty-field'). This class is automatically added and removed as needed depending on the current field value. More...
 
virtual string EmptyText [get, set]
 The default text to place into an empty field. More...
 
virtual bool EnableKeyEvents [get, set]
 True to enable the proxying of key events for the HTML input field (defaults to false) More...
 
virtual bool EnforceMaxLength [get, set]
 True to set the maxLength property on the underlying input field. Defaults to false More...
 
virtual bool Grow [get, set]
 True if this field should automatically grow and shrink to its content (defaults to false). More...
 
virtual string GrowAppend [get, set]
 A string that will be appended to the field's current value for the purposes of calculating the target field size. Only used when the grow config is true. Defaults to a single capital "W" (the widest character in common fonts) to leave enough space for the next typed character and avoid the field value shifting before the width is adjusted. More...
 
virtual int GrowMax [get, set]
 The maximum width to allow when grow = true (defaults to 800). More...
 
virtual int GrowMin [get, set]
 The minimum width to allow when grow = true (defaults to 30). More...
 
virtual string MaskRe [get, set]
 An input mask regular expression that will be used to filter keystrokes (character being typed) that do not match. Note: It dose not filter characters already in the input. More...
 
virtual int MaxLength [get, set]
 Maximum input field length allowed by validation (defaults to Number.MAX_VALUE). This behavior is intended to provide instant feedback to the user by improving usability to allow pasting and editing or overtyping and back tracking. To restrict the maximum number of characters that can be entered into the field use the enforceMaxLength option. More...
 
virtual string MaxLengthText [get, set]
 Error text to display if the maximum length validation fails (defaults to 'The maximum length for this field is {maxLength}'). More...
 
virtual int MinLength [get, set]
 Minimum input field length required (defaults to 0). More...
 
virtual string MinLengthText [get, set]
 Error text to display if the minimum length validation fails (defaults to 'The minimum length for this field is {minLength}'). More...
 
virtual string Regex [get, set]
 A JavaScript RegExp object to be tested against the field value during validation (defaults to undefined). If the test fails, the field will be marked invalid using regexText. More...
 
virtual string RegexText [get, set]
 The error text to display if regex is used and the test fails during validation (defaults to ''). More...
 
virtual bool SelectOnFocus [get, set]
 True to automatically select any existing field text when the field receives input focus (defaults to false). More...
 
virtual int Size [get, set]
 An initial value for the 'size' attribute on the text input element. This is only used if the field has no configured width and is not given a width by its container's layout. Defaults to 20. More...
 
virtual string StripCharsRe [get, set]
 A JavaScript RegExp object used to strip unwanted content from the value during input. If stripCharsRe is specified, every character sequence matching stripCharsRe will be removed. More...
 
virtual JFunction Validator [get]
 A custom validation function to be called during field validation (getErrors) (defaults to undefined). If specified, this function will be called first, allowing the developer to override the default validation process. This function will be passed the following Parameters: value: Mixed The current field value More...
 
virtual ValidationType StandardVtype [get, set]
 A validation type name as defined in Ext.form.VTypes (defaults to null). More...
 
virtual string Vtype [get, set]
 A validation type name as defined in Ext.form.VTypes (defaults to null). More...
 
virtual string VtypeText [get, set]
 A custom error message to display in place of the default message provided for the vtype currently set for this field (defaults to ''). Only applies if vtype is set, else ignored. More...
 
override ConfigOptionsCollection ConfigOptions [get]
 
- Properties inherited from Ext.Net.BaseItem
virtual string InstanceOf [get]
 
ItemState State [get]
 
virtual DefaultValueMode DefaultValueMode [get, set]
 
virtual bool DesignMode [get]
 
bool AutoDataBind [get, set]
 
ResourceManager ResourceManager [get]
 
virtual Control Owner [get, set]
 The Owner Control for this Listener. More...
 
virtual bool IsDefault [get]
 Does this object currently represent it's default state. More...
 
bool IsTrackingViewState [get]
 
EventHandlerList Events [get]
 
EventHandler DataBinding
 
Control?? BindingContainer [get]
 
virtual ConfigItemCollection?? CustomConfig [get]
 Collection of custom js config More...
 
virtual ConfigOptionsCollection ConfigOptions [get]
 
virtual ConfigOptionsExtraction ConfigOptionsExtraction [get]
 
System.Web.Mvc.HtmlHelper?? HtmlHelper [get, set]
 
- Properties inherited from Ext.Net.IXObject
ConfigOptionsCollection ConfigOptions [get]
 
ConfigOptionsExtraction ConfigOptionsExtraction [get]
 
DefaultValueMode DefaultValueMode [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from Ext.Net.BaseItem
 BaseItem (Control owner)
 
 BaseItem ()
 
virtual void OwnerUpdate (Control owner)
 
virtual void OnDataBinding (EventArgs e)
 

Detailed Description

Constructor & Destructor Documentation

◆ Labelable() [1/3]

Ext.Net.Labelable.Labelable ( )
inline

◆ Labelable() [2/3]

Ext.Net.Labelable.Labelable ( BaseControl  owner)
inline

◆ Labelable() [3/3]

Ext.Net.Labelable.Labelable ( Config  config)
inline

Member Function Documentation

◆ operator Labelable()

static implicit Ext.Net.Labelable.operator Labelable ( Labelable.Config  config)
inlinestatic

◆ ToBuilder()

Labelable.Builder Ext.Net.Labelable.ToBuilder ( )
inline

◆ ToNativeBuilder()

override IControlBuilder Ext.Net.Labelable.ToNativeBuilder ( )
inlinevirtual

Reimplemented from Ext.Net.BaseItem.

Property Documentation

◆ ActiveError

virtual string Ext.Net.Labelable.ActiveError
getset

If specified, then the component will be displayed with this value as its active error when first rendered. Defaults to undefined. Use setActiveError or unsetActiveError to change it after component creation.

◆ ActiveErrorsTpl

virtual string Ext.Net.Labelable.ActiveErrorsTpl
getset

The template used to format the Array of error messages passed to setActiveErrors into a single HTML string. By default this renders each message as an item in an unordered list.

Standard template: '<tpl if="errors &amp;&amp; errors.length">', '<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>', '</tpl>'

◆ AllowBlank

virtual bool Ext.Net.Labelable.AllowBlank
getset

False to validate that the value length > 0 (defaults to true).

◆ AriaErrorText

virtual string Ext.Net.Labelable.AriaErrorText
getset

Localized announcement text for validation errors. This text will be used by Assistive Technologies such as screen readers to alert the users when field validation fails.

Introduced on ExtJS 6.2.0.

◆ AriaHelp

virtual string Ext.Net.Labelable.AriaHelp
getset

Optional text description for this object. This text will be announced to Assistive Technology users when the object is focused.

Introduced on ExtJS 6.2.0.

◆ AutoFitErrors

virtual bool Ext.Net.Labelable.AutoFitErrors
getset

Whether to adjust the component's body area to make room for 'side' or 'under' error messages. Defaults to true.

◆ BaseBodyCls

virtual string Ext.Net.Labelable.BaseBodyCls
getset

The CSS class to be applied to the body content element. Defaults to 'x-form-item-body'.

◆ BlankText

virtual string Ext.Net.Labelable.BlankText
getset

Error text to display if the allow blank validation fails (defaults to 'This field is required').

◆ ClearCls

virtual string Ext.Net.Labelable.ClearCls
getset

The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide field clearing (defaults to 'x-form-clear-left').

◆ ConfigOptions

override ConfigOptionsCollection Ext.Net.Labelable.ConfigOptions
get

◆ DirtyCls

virtual string Ext.Net.Labelable.DirtyCls
getset

The CSS class to use when the field value is dirty.

◆ DisableKeyFilter

virtual bool Ext.Net.Labelable.DisableKeyFilter
getset

True to disable input keystroke filtering (defaults to false).

◆ EmptyCls

virtual string Ext.Net.Labelable.EmptyCls
getset

The CSS class to apply to an empty field to style the emptyText (defaults to 'x-form-empty-field'). This class is automatically added and removed as needed depending on the current field value.

◆ EmptyText

virtual string Ext.Net.Labelable.EmptyText
getset

The default text to place into an empty field.

Note that normally this value will be submitted to the server if this field is enabled; to prevent this you can set the submitEmptyText option of Ext.form.Basic.submit to false.

Also note that if you use inputType:'file', emptyText is not supported and should be avoided.

Note that for browsers that support it, setting this property will use the HTML 5 placeholder attribute, and for older browsers that don't support the HTML 5 placeholder attribute the value will be placed directly into the input element itself as the raw value. This means that older browsers will obfuscate the emptyText value for password input fields.

◆ EnableKeyEvents

virtual bool Ext.Net.Labelable.EnableKeyEvents
getset

True to enable the proxying of key events for the HTML input field (defaults to false)

◆ EnforceMaxLength

virtual bool Ext.Net.Labelable.EnforceMaxLength
getset

True to set the maxLength property on the underlying input field. Defaults to false

◆ ErrorMsgCls

virtual string Ext.Net.Labelable.ErrorMsgCls
getset

The CSS class to be applied to the error message element. Defaults to 'x-form-error-msg'.

◆ FieldBodyCls

virtual string Ext.Net.Labelable.FieldBodyCls
getset

An extra CSS class to be applied to the body content element in addition to fieldBodyCls. Defaults to empty.

◆ FieldLabel

virtual string Ext.Net.Labelable.FieldLabel
getset

The label for the field. It gets appended with the labelSeparator, and its position and sizing is determined by the labelAlign, labelWidth, and labelPad configs. Defaults to undefined.

◆ FocusCls

virtual string Ext.Net.Labelable.FocusCls
getset

The CSS class to use when the field receives focus (defaults to 'x-form-focus')

◆ FormItemCls

virtual string Ext.Net.Labelable.FormItemCls
getset

A CSS class to be applied to the outermost element to denote that it is participating in the form field layout. Defaults to 'x-form-item'.

◆ Grow

virtual bool Ext.Net.Labelable.Grow
getset

True if this field should automatically grow and shrink to its content (defaults to false).

◆ GrowAppend

virtual string Ext.Net.Labelable.GrowAppend
getset

A string that will be appended to the field's current value for the purposes of calculating the target field size. Only used when the grow config is true. Defaults to a single capital "W" (the widest character in common fonts) to leave enough space for the next typed character and avoid the field value shifting before the width is adjusted.

◆ GrowMax

virtual int Ext.Net.Labelable.GrowMax
getset

The maximum width to allow when grow = true (defaults to 800).

◆ GrowMin

virtual int Ext.Net.Labelable.GrowMin
getset

The minimum width to allow when grow = true (defaults to 30).

◆ HideEmptyLabel

virtual bool Ext.Net.Labelable.HideEmptyLabel
getset

When set to true, the label element (fieldLabel and labelSeparator) will be automatically hidden if the fieldLabel is empty. Setting this to false will cause the empty label element to be rendered and space to be reserved for it; this is useful if you want a field without a label to line up with other labeled fields in the same form. Defaults to true.

If you wish to unconditionall hide the label even if a non-empty fieldLabel is configured, then set the hideLabel config to true.

◆ HideLabel

virtual bool Ext.Net.Labelable.HideLabel
getset

Set to true to completely hide the label element (fieldLabel and labelSeparator). Defaults to false.

Also see hideEmptyLabel, which controls whether space will be reserved for an empty fieldLabel.

◆ InvalidCls

virtual string Ext.Net.Labelable.InvalidCls
getset

The CSS class to use when marking the component invalid (defaults to 'x-form-invalid')

◆ InvalidText

virtual string Ext.Net.Labelable.InvalidText
getset

The error text to use when marking a field invalid and no message is provided (defaults to 'The value in this field is invalid')

◆ LabelAlign

virtual LabelAlign Ext.Net.Labelable.LabelAlign
getset

Controls the position and alignment of the fieldLabel. Valid values are: "left" (the default) - The label is positioned to the left of the field, with its text aligned to the left. Its width is determined by the labelWidth config. "top" - The label is positioned above the field. "right" - The label is positioned to the left of the field, with its text aligned to the right. Its width is determined by the labelWidth config.

◆ LabelCls

virtual string Ext.Net.Labelable.LabelCls
getset

The CSS class to be applied to the label element. Defaults to 'x-form-item-label'. This (single) CSS class is used to formulate the renderSelector and drives the field layout where it is concatenated with a hyphen ('-') and labelAlign. To add additional classes, use labelClsExtra.

◆ LabelPad

virtual int Ext.Net.Labelable.LabelPad
getset

The amount of space in pixels between the fieldLabel and the input field. Defaults to 5.

◆ LabelSeparator

virtual string Ext.Net.Labelable.LabelSeparator
getset

Character(s) to be inserted at the end of the label text.

◆ LabelStyle

virtual string Ext.Net.Labelable.LabelStyle
getset

A CSS style specification string to apply directly to this field's label. Defaults to undefined.

◆ LabelWidth

virtual int Ext.Net.Labelable.LabelWidth
getset

The width of the fieldLabel in pixels. Only applicable if the labelAlign is set to "left" or "right". Defaults to 100.

◆ MaskRe

virtual string Ext.Net.Labelable.MaskRe
getset

An input mask regular expression that will be used to filter keystrokes (character being typed) that do not match. Note: It dose not filter characters already in the input.

◆ MaxLength

virtual int Ext.Net.Labelable.MaxLength
getset

Maximum input field length allowed by validation (defaults to Number.MAX_VALUE). This behavior is intended to provide instant feedback to the user by improving usability to allow pasting and editing or overtyping and back tracking. To restrict the maximum number of characters that can be entered into the field use the enforceMaxLength option.

◆ MaxLengthText

virtual string Ext.Net.Labelable.MaxLengthText
getset

Error text to display if the maximum length validation fails (defaults to 'The maximum length for this field is {maxLength}').

◆ MinLength

virtual int Ext.Net.Labelable.MinLength
getset

Minimum input field length required (defaults to 0).

◆ MinLengthText

virtual string Ext.Net.Labelable.MinLengthText
getset

Error text to display if the minimum length validation fails (defaults to 'The minimum length for this field is {minLength}').

◆ MsgTarget

virtual MessageTarget Ext.Net.Labelable.MsgTarget
getset

The location where the error message text should display. Must be one of the following values:

qtip Display a quick tip containing the message when the user hovers over the field. This is the default. title Display the message in a default browser title attribute popup. under Add a block div beneath the field containing the error message. side Add an error icon to the right of the field, displaying the message in a popup on hover. none Don't display any error message. This might be useful if you are implementing custom error display. [element id] Add the error message directly to the innerHTML of the specified element.

◆ MsgTargetElement

virtual string Ext.Net.Labelable.MsgTargetElement
getset

Add the error message directly to the innerHTML of the specified element.

◆ PreserveIndicatorIcon

virtual bool Ext.Net.Labelable.PreserveIndicatorIcon
getset

Preserve indicator icon place. Defaults to false

◆ PreventMark

virtual bool Ext.Net.Labelable.PreventMark
getset

true to disable displaying any error message set on this object. Defaults to false.

◆ ReadOnly

virtual bool Ext.Net.Labelable.ReadOnly
getset

true to mark the field as readOnly in HTML (defaults to false). Note: this only sets the element's readOnly DOM attribute. Setting readOnly=true, for example, will not disable triggering a ComboBox or Date; it gives you the option of forcing the user to choose via the trigger without typing in the text box. To hide the trigger use hideTrigger.

◆ ReadOnlyCls

virtual string Ext.Net.Labelable.ReadOnlyCls
getset

The CSS class applied to the component's main element when it is readOnly.

◆ Regex

virtual string Ext.Net.Labelable.Regex
getset

A JavaScript RegExp object to be tested against the field value during validation (defaults to undefined). If the test fails, the field will be marked invalid using regexText.

◆ RegexText

virtual string Ext.Net.Labelable.RegexText
getset

The error text to display if regex is used and the test fails during validation (defaults to '').

◆ SelectOnFocus

virtual bool Ext.Net.Labelable.SelectOnFocus
getset

True to automatically select any existing field text when the field receives input focus (defaults to false).

◆ Size

virtual int Ext.Net.Labelable.Size
getset

An initial value for the 'size' attribute on the text input element. This is only used if the field has no configured width and is not given a width by its container's layout. Defaults to 20.

◆ StandardVtype

virtual ValidationType Ext.Net.Labelable.StandardVtype
getset

A validation type name as defined in Ext.form.VTypes (defaults to null).

◆ StripCharsRe

virtual string Ext.Net.Labelable.StripCharsRe
getset

A JavaScript RegExp object used to strip unwanted content from the value during input. If stripCharsRe is specified, every character sequence matching stripCharsRe will be removed.

◆ SubmitValue

virtual bool Ext.Net.Labelable.SubmitValue
getset

Setting this to false will prevent the field from being submitted even when it is not disabled. Defaults to true.

◆ Validator

virtual JFunction Ext.Net.Labelable.Validator
get

A custom validation function to be called during field validation (getErrors) (defaults to undefined). If specified, this function will be called first, allowing the developer to override the default validation process. This function will be passed the following Parameters: value: Mixed The current field value

This function is to Return: true: Boolean true if the value is valid msg: String An error message if the value is invalid

◆ Vtype

virtual string Ext.Net.Labelable.Vtype
getset

A validation type name as defined in Ext.form.VTypes (defaults to null).

◆ VtypeText

virtual string Ext.Net.Labelable.VtypeText
getset

A custom error message to display in place of the default message provided for the vtype currently set for this field (defaults to ''). Only applies if vtype is set, else ignored.


The documentation for this class was generated from the following files: