Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing constructor with scanNestedDefinitions option #11801

Merged
merged 3 commits into from
Nov 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion server/src/main/java/com/vaadin/data/BeanValidationBinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,25 @@ public class BeanValidationBinder<BEAN> extends Binder<BEAN> {
* the bean type to use, not <code>null</code>
*/
public BeanValidationBinder(Class<BEAN> beanType) {
super(beanType);
this(beanType,false);
}

/**
* Creates a new binder that uses reflection based on the provided bean type
* to resolve bean properties. It assumes that JSR-303 bean validation
* implementation is present on the classpath. If there is no such
* implementation available then {@link Binder} class should be used instead
* (this constructor will throw an exception). Otherwise
* {@link BeanValidator} is added to each binding that is defined using a
* property name.
*
* @param beanType
* the bean type to use, not {@code null}
* @param scanNestedDefinitions
* if {@code true}, scan for nested property definitions as well
*/
public BeanValidationBinder(Class<BEAN> beanType, boolean scanNestedDefinitions) {
super(beanType, scanNestedDefinitions);
if (!BeanUtil.checkBeanValidationAvailable()) {
throw new IllegalStateException(BeanValidationBinder.class
.getSimpleName()
Expand Down