use of org.kie.workbench.common.forms.processing.engine.handling.impl.FormValidatorImpl in project kie-wb-common by kiegroup.
the class DynamicFormHandlerGenerator method generateFormHandler.
@Override
public FormHandler generateFormHandler(MapModelRenderingContext context) {
DynamicModelValidator dynamicValidator = new DynamicModelValidator(validator);
if (context.getRootForm().getModel() instanceof JavaFormModel) {
DynamicModelConstraints constraints = context.getModelConstraints().get(((JavaFormModel) context.getRootForm().getModel()).getType());
if (constraints != null) {
dynamicValidator.setModelConstraints(constraints);
}
}
FormValidator formValidator = new FormValidatorImpl(dynamicValidator, fieldStateValidator);
FormHandler handler = new FormHandlerImpl(formValidator, new FieldChangeHandlerManagerImpl());
if (context.getParentContext() == null) {
helper.initContext(context);
}
return handler;
}
use of org.kie.workbench.common.forms.processing.engine.handling.impl.FormValidatorImpl in project kie-wb-common by kiegroup.
the class StaticFormHandlerGenerator method generateFormHandler.
@Override
public FormHandler generateFormHandler(FormRenderingContext context) {
FormValidator formValidator = new FormValidatorImpl(new DefaultModelValidator(validator), fieldStateValidator);
FormHandler handler = new FormHandlerImpl(formValidator, new FieldChangeHandlerManagerImpl());
return handler;
}
Aggregations