From 2e3f4708a8d56441f4a1a6ba9c34cc664e3f15af Mon Sep 17 00:00:00 2001 From: Mehdi Javan <32511762+mehdi-vaadin@users.noreply.github.com> Date: Thu, 9 Aug 2018 09:07:49 +0300 Subject: [PATCH] Improving javadoc of Binder.removeBinding (#11107) Fixes #11091 --- .../src/main/java/com/vaadin/data/Binder.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/vaadin/data/Binder.java b/server/src/main/java/com/vaadin/data/Binder.java index 92d1d58cb6..88764a6a2f 100644 --- a/server/src/main/java/com/vaadin/data/Binder.java +++ b/server/src/main/java/com/vaadin/data/Binder.java @@ -2787,7 +2787,16 @@ public class Binder implements Serializable { } /** - * Finds and removes all Bindings for the given field. + * Finds and removes all Bindings for the given field. Note that this method + * and other overloads of removeBinding method do not reset component errors + * that might have been added to the field and do not remove required + * indicator of the field no matter if it was set by Binder or not. To reset + * component errors, {@code field.setComponentError(null)} should be called + * and to remove required indicator, + * {@code field.setRequiredIndicatorVisible(false)} should be called. + * + * @see com.vaadin.ui.AbstractComponent#setComponentError + * @see com.vaadin.ui.AbstractComponent#setRequiredIndicatorVisible * * @param field * the field to remove from bindings @@ -2805,6 +2814,10 @@ public class Binder implements Serializable { /** * Removes the given Binding from this Binder. * + * @see Binder#removeBinding(HasValue) + * @see com.vaadin.ui.AbstractComponent#setComponentError + * @see com.vaadin.ui.AbstractComponent#setRequiredIndicatorVisible + * * @param binding * the binding to remove * @@ -2849,6 +2862,10 @@ public class Binder implements Serializable { /** * Finds and removes the Binding for the given property name. * + * @see Binder#removeBinding(HasValue) + * @see com.vaadin.ui.AbstractComponent#setComponentError + * @see com.vaadin.ui.AbstractComponent#setRequiredIndicatorVisible + * * @param propertyName * the propertyName to remove from bindings * -- 2.39.5