Class DefaultHandler<TModel, T>
Generates the HTML for the Field Element of text input fields - always returns true when asked if it can handle a field.
Implements
IFieldGeneratorHandler<TModel, T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ChameleonForms.FieldGenerators.Handlers
Assembly: ChameleonForms.dll
Syntax
public class DefaultHandler<TModel, T> : FieldGeneratorHandler<TModel, T>, IFieldGeneratorHandler<TModel, T>
Type Parameters
Name | Description |
---|---|
TModel | The type of the model the form is being output for |
T | The type of the property in the model that the specific field is being output for |
Constructors
| Improve this Doc View SourceDefaultHandler(IFieldGenerator<TModel, T>)
Constructor for the Default Field Generator Handler.
Declaration
public DefaultHandler(IFieldGenerator<TModel, T> fieldGenerator)
Parameters
Type | Name | Description |
---|---|---|
IFieldGenerator<TModel, T> | fieldGenerator | The field generator for the field |
Methods
| Improve this Doc View SourceCanHandle()
Whether or not the current field can be output using this field generator handler.
Declaration
public override bool CanHandle()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
ChameleonForms.FieldGenerators.Handlers.FieldGeneratorHandler<TModel, T>.CanHandle()
|
Improve this Doc
View Source
GenerateFieldHtml(IReadonlyFieldConfiguration)
Generate the HTML for the current field's Field Element using this handler.
Declaration
public override IHtmlContent GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IReadonlyFieldConfiguration | fieldConfiguration | The field configuration to use to generate the HTML |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent | The HTML for the Field Element |
Overrides
ChameleonForms.FieldGenerators.Handlers.FieldGeneratorHandler<TModel, T>.GenerateFieldHtml(ChameleonForms.Component.Config.IReadonlyFieldConfiguration)
|
Improve this Doc
View Source
GetDisplayType(IReadonlyFieldConfiguration)
The type of control the field will be displayed as.
Declaration
public override FieldDisplayType GetDisplayType(IReadonlyFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IReadonlyFieldConfiguration | fieldConfiguration | The configuration for the field |
Returns
Type | Description |
---|---|
FieldDisplayType | The display type of the field control |
Overrides
ChameleonForms.FieldGenerators.Handlers.FieldGeneratorHandler<TModel, T>.GetDisplayType(ChameleonForms.Component.Config.IReadonlyFieldConfiguration)