Interface IFormComponent
Represents a form component.
public interface IFormComponent : IFormItem<IFormComponentClientProperties>, IFormItem
- Inherited Members
- Extension Methods
Properties
AdditionalActions
Gets the enumeration of additional actions associated with the form component.
IEnumerable<IAdditionalAction> AdditionalActions { get; }
Property Value
- IEnumerable<IAdditionalAction>
Remarks
Use the AddAdditionalAction(IAdditionalAction) method to add a new additional action to this collection.
- See Also
Guid
Gets or sets the underlying field GUID.
Guid Guid { get; }
Property Value
- Guid
HasDependencies
Gets or sets the value indicating whether evaluation of a visibility condition of some other component depends on this component's value.
bool HasDependencies { get; }
Property Value
- bool
Name
Gets the underlying field name.
string Name { get; }
Property Value
- string
Properties
Gets the form component's properties.
IFormComponentProperties Properties { get; }
Property Value
Required
Gets or sets value indicating whether the underlying field is required. False by default. If false, the form component's implementation must accept nullable input.
bool Required { get; }
Property Value
- bool
ValidationRules
Gets the enumeration of validation rules associated with the form component.
IEnumerable<IValidationRule> ValidationRules { get; }
Property Value
- IEnumerable<IValidationRule>
Remarks
Use the AddValidationRule(IValidationRule) method to add a new validation rule to this collection.
- See Also
ValueType
Gets the form component's value type.
Type ValueType { get; }
Property Value
- Type
VisibilityConditions
Gets the enumeration of visibility conditions associated with the form component.
IEnumerable<IVisibilityCondition> VisibilityConditions { get; }
Property Value
- IEnumerable<IVisibilityCondition>
- See Also
Methods
AddAdditionalAction(IAdditionalAction)
Adds a new additional action.
void AddAdditionalAction(IAdditionalAction additionalAction)
Parameters
additionalAction
IAdditionalActionAdditional action to be added.
Exceptions
- ArgumentNullException
Thrown when
additionalAction
is null.- InvalidOperationException
Thrown when there is already another additional action with the same Identifier.
AddValidationRule(IValidationRule)
Adds a new validation rule.
The validationRule
must be of proper type of an exception is thrown.
void AddValidationRule(IValidationRule validationRule)
Parameters
validationRule
IValidationRuleValidation rule to be added.
Exceptions
- ArgumentNullException
Thrown when
validationRule
is null.
AddVisibilityCondition(IVisibilityCondition)
Adds a new visibility condition.
void AddVisibilityCondition(IVisibilityCondition visibilityCondition)
Parameters
visibilityCondition
IVisibilityConditionVisibility condition to be added.
Exceptions
- ArgumentNullException
Thrown when
visibilityCondition
is null.
BindContext(IFormContext)
Binds context to the form component.
Task BindContext(IFormContext context)
Parameters
context
IFormContextContext to be used.
Returns
- Task
Remarks
This method is called later than ConfigureComponent() method.
ConfigureComponent()
Configures the form component. This method is called when all form component properties are set.
void ConfigureComponent()
Remarks
Override this method to set component inner state, like additional component validation rules.
GetObjectValue()
Gets the value of the form component.
object GetObjectValue()
Returns
- object
Returns the value of the form component.
SetObjectValue(object)
Sets the value of the form component.
The value
must be of proper type or an exception is thrown.
void SetObjectValue(object value)
Parameters
value
objectValue to be set.