Package org.vaadin.firitin.util
Class BrowserPrompt
java.lang.Object
org.vaadin.firitin.util.BrowserPrompt
Helper class to use JS API browsers have to prompt simple input values.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<Integer>
promptInteger
(String message) Shows a browser prompt for an integer.static CompletableFuture<String>
promptString
(com.vaadin.flow.component.UI ui, String message, String defaultValue) Shows a browser prompt.static CompletableFuture<String>
promptString
(String message) Shows a browser prompt.static CompletableFuture<String>
promptString
(String message, String defaultValue) Shows a browser prompt.static CompletableFuture<String>
showPrompt
(com.vaadin.flow.component.UI ui, String message, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.use promptString insteadstatic CompletableFuture<String>
showPrompt
(String message) Deprecated, for removal: This API element is subject to removal in a future version.use promptString insteadstatic CompletableFuture<String>
showPrompt
(String message, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.use promptString instead
-
Constructor Details
-
BrowserPrompt
public BrowserPrompt()
-
-
Method Details
-
promptInteger
Shows a browser prompt for an integer.- Parameters:
message
- the message to show- Returns:
- the value entered by the user
-
promptString
Shows a browser prompt.- Parameters:
message
- the message to show- Returns:
- the value entered by the user
-
promptString
Shows a browser prompt.- Parameters:
message
- the message to showdefaultValue
- the default value to show- Returns:
- the value entered by the user
-
promptString
public static CompletableFuture<String> promptString(com.vaadin.flow.component.UI ui, String message, String defaultValue) Shows a browser prompt.- Parameters:
ui
- the UI to usemessage
- the message to showdefaultValue
- the default value to show- Returns:
- the value entered by the user
-
showPrompt
Deprecated, for removal: This API element is subject to removal in a future version.use promptString insteadShows a browser prompt.- Parameters:
message
- the message to show- Returns:
- the value entered by the user
-
showPrompt
@Deprecated(forRemoval=true) public static CompletableFuture<String> showPrompt(String message, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.use promptString insteadShows a browser prompt.- Parameters:
message
- the message to showdefaultValue
- the default value to show- Returns:
- the value entered by the user
-
showPrompt
@Deprecated(forRemoval=true) public static CompletableFuture<String> showPrompt(com.vaadin.flow.component.UI ui, String message, String defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.use promptString insteadShows a browser prompt.- Parameters:
ui
- the UI to usemessage
- the message to showdefaultValue
- the default value to show- Returns:
- the value entered by the user
-