From 697f770287bb786b6b5d4944a9202d145e4251f5 Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Wed, 27 Sep 2017 10:02:29 +0300 Subject: Implement error level on client side (#9817) Add additional class names and style to components and error indicators to distinguish different error levels. Vaadin 8 implementation of #9816. Cherry picked changes and added compatibility package component changes and tests. Resolves #3139 --- compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java | 2 +- compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java | 2 +- compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java | 1 + .../java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) (limited to 'compatibility-server/src') diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java index 2bb4065921..8bb2cefccc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java @@ -21,9 +21,9 @@ import java.io.Serializable; import com.vaadin.data.Binder; import com.vaadin.server.AbstractErrorMessage; import com.vaadin.server.ErrorMessage; -import com.vaadin.server.ErrorMessage.ErrorLevel; import com.vaadin.server.ErrorMessageProducer; import com.vaadin.server.UserError; +import com.vaadin.shared.ui.ErrorLevel; import com.vaadin.v7.data.Validator.InvalidValueException; /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java index f226622359..f13a01a5b5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java @@ -22,10 +22,10 @@ import com.vaadin.data.Binder; import com.vaadin.server.AbstractErrorMessage; import com.vaadin.server.AbstractErrorMessage.ContentMode; import com.vaadin.server.ErrorMessage; -import com.vaadin.server.ErrorMessage.ErrorLevel; import com.vaadin.server.ErrorMessageProducer; import com.vaadin.server.UserError; import com.vaadin.server.VaadinServlet; +import com.vaadin.shared.ui.ErrorLevel; /** * Interface that implements a method for validating if an {@link Object} is diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index 9b64d1e6f8..6cd7323cd9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -58,6 +58,7 @@ import com.vaadin.server.VaadinSession; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.Registration; import com.vaadin.shared.data.sort.SortDirection; +import com.vaadin.shared.ui.ErrorLevel; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.Component; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java index 5a26833169..938e2d61de 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/ui/AbstractLegacyComponentDeclarativeTest.java @@ -29,12 +29,12 @@ import org.jsoup.parser.Tag; import org.junit.Before; import org.junit.Test; -import com.vaadin.server.ErrorMessage.ErrorLevel; import com.vaadin.server.ExternalResource; import com.vaadin.server.FileResource; import com.vaadin.server.Responsive; import com.vaadin.server.ThemeResource; import com.vaadin.server.UserError; +import com.vaadin.shared.ui.ErrorLevel; import com.vaadin.tests.design.DeclarativeTestBase; import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.Label; -- cgit v1.2.3