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 /shared/src | |
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 'shared/src')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldServerRpc.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldServerRpc.java index e82c45f171..0344110443 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldServerRpc.java +++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldServerRpc.java @@ -17,6 +17,7 @@ package com.vaadin.shared.ui.datefield; import java.util.Map; +import com.vaadin.shared.annotations.Delayed; import com.vaadin.shared.communication.ServerRpc; /** @@ -42,6 +43,27 @@ public interface AbstractDateFieldServerRpc extends ServerRpc { void update(String newDateString, Map<String, Integer> resolutions); /** + * Updates the typed data string and resolution names and values with + * delayed rpc. The rpc will be sent by triggering another non + * {@link Delayed} annotated rpc. + * + * @since + * + * @param newDateString + * the value of the text field part. It enables analyzing invalid + * input on the server. {@code null} if the date was chosen with + * popup calendar or contains user-typed string + * @param resolutions + * map of time unit (resolution) name and value, the key is the + * resolution name e.g. "HOUR", "MINUTE", the value can be + * {@code null}. If the map is empty, that means the + * {@code newDateString} is invalid + */ + @Delayed(lastOnly = true) + void updateValueWithDelay(String newDateString, + Map<String, Integer> resolutions); + + /** * Indicates to the server that the client-side has lost focus. */ void blur(); |