Class BrowserPrompt

java.lang.Object
org.vaadin.firitin.util.BrowserPrompt

public class BrowserPrompt extends Object
Helper class to use JS API browsers have to prompt simple input values.
  • Constructor Details

    • BrowserPrompt

      public BrowserPrompt()
  • Method Details

    • promptInteger

      public static CompletableFuture<Integer> promptInteger(String message)
      Shows a browser prompt for an integer.
      Parameters:
      message - the message to show
      Returns:
      the value entered by the user
    • promptString

      public static CompletableFuture<String> promptString(String message)
      Shows a browser prompt.
      Parameters:
      message - the message to show
      Returns:
      the value entered by the user
    • promptString

      public static CompletableFuture<String> promptString(String message, String defaultValue)
      Shows a browser prompt.
      Parameters:
      message - the message to show
      defaultValue - 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 use
      message - the message to show
      defaultValue - the default value to show
      Returns:
      the value entered by the user
    • showPrompt

      @Deprecated(forRemoval=true) public static CompletableFuture<String> showPrompt(String message)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use promptString instead
      Shows 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 instead
      Shows a browser prompt.
      Parameters:
      message - the message to show
      defaultValue - 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 instead
      Shows a browser prompt.
      Parameters:
      ui - the UI to use
      message - the message to show
      defaultValue - the default value to show
      Returns:
      the value entered by the user