diff options
author | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2019-06-14 15:31:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 15:31:44 +0300 |
commit | 7bda912a77f6295ac339a3035b0de8d7ed45cfa3 (patch) | |
tree | d49208274e8441ceedac8fa9ef292b3f065c846e /server | |
parent | d18f8ddbaab2d192dacf7d7485d87b51fe1e7cb9 (diff) | |
download | vaadin-framework-7bda912a77f6295ac339a3035b0de8d7ed45cfa3.tar.gz vaadin-framework-7bda912a77f6295ac339a3035b0de8d7ed45cfa3.zip |
Separates a rpc for handling the client event order in DateTimeField (#11574)
* Using @Delayed annotation for DateField Rpc
* Separate a rpc for handling the time change in DateTimeField
* Add test case for wrong event order
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/AbstractDateField.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractDateField.java b/server/src/main/java/com/vaadin/ui/AbstractDateField.java index f03c900b97..f7a085bc0d 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractDateField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractDateField.java @@ -88,6 +88,16 @@ public abstract class AbstractDateField<T extends Temporal & TemporalAdjuster & @Override public void update(String newDateString, Map<String, Integer> resolutions) { + valueUpdate(newDateString, resolutions); + } + + @Override + public void updateValueWithDelay(String newDateString, + Map<String, Integer> resolutions) { + valueUpdate(newDateString, resolutions); + } + + private void valueUpdate(String newDateString, Map<String, Integer> resolutions) { Set<String> resolutionNames = getResolutions().map(Enum::name) .collect(Collectors.toSet()); resolutionNames.retainAll(resolutions.keySet()); |