Class FormBuilderModelManager
Model binder used for binding values when submitting forms built via Form builder.
[Obsolete("This class was not intented for a public use and will be removed in the next version.")]
public class FormBuilderModelManager : IFormBuilderModelManager
- Inheritance
-
objectFormBuilderModelManager
- Implements
- Extension Methods
Constructors
FormBuilderModelManager(IFormProvider, IFormComponentVisibilityEvaluator, IBindablePropertiesCache, IFormComponentValidator)
Initializes a new instance of the FormBuilderModelManager class.
public FormBuilderModelManager(IFormProvider formProvider, IFormComponentVisibilityEvaluator formComponentVisibilityEvaluator, IBindablePropertiesCache bindablePropertiesCache, IFormComponentValidator formComponentValidator)
Parameters
formProviderIFormProviderProvides form components for BizFormInfo.
formComponentVisibilityEvaluatorIFormComponentVisibilityEvaluatorEvaluator for form component visibility.
bindablePropertiesCacheIBindablePropertiesCacheCache used to retrieve list of bindable properties.
formComponentValidatorIFormComponentValidatorHelper class used to perform model validation.
Exceptions
- ArgumentNullException
Thrown when
formProviderorformComponentVisibilityEvaluatoris null.
Methods
BindModelAsync(IFormComponentBinder, FormBuilderBindingContext)
Binds form components according to data source used by formComponentBinder.
Moreover components are validated and the model state is filled with any errors that occurred during validation.
public Task<List<FormComponent>> BindModelAsync(IFormComponentBinder formComponentBinder, FormBuilderBindingContext bindingContext)
Parameters
formComponentBinderIFormComponentBinderResponsible for binding form components. Default binder that binds from form collection can be created by CreateFormComponentBinder(Controller) method.
bindingContextFormBuilderBindingContextContext containing necessary data for binding.
Returns
- Task<List<FormComponent>>
Exceptions
- ArgumentNullException
Thrown when
formComponentBinderorbindingContextis null.