Enum Class UIUpdateStrategy

java.lang.Object
java.lang.Enum<UIUpdateStrategy>
com.vaadin.flow.hotswap.UIUpdateStrategy
All Implemented Interfaces:
Serializable, Comparable<UIUpdateStrategy>, Constable

public enum UIUpdateStrategy extends Enum<UIUpdateStrategy>
Strategy for updating the UI after a hotswap event.

This enum defines how the browser UI should respond when classes or resources are hot-swapped during development. The strategy determines whether a partial refresh or a full page reload is needed.

Note that RELOAD has higher priority than REFRESH. Once a RELOAD strategy is set, it cannot be downgraded to REFRESH.

For internal use only. May be renamed or removed in a future release.

Since:
25.0
  • Enum Constant Details

    • REFRESH

      public static final UIUpdateStrategy REFRESH
      Performs a partial UI refresh without reloading the entire page.

      This strategy attempts to update only the affected UI components, preserving the current application state and providing a faster update experience during development.

    • RELOAD

      public static final UIUpdateStrategy RELOAD
      Performs a full browser page reload.

      This strategy forces the browser to reload the entire page, which is necessary when changes cannot be applied through a partial refresh (e.g., structural changes, route modifications, or critical component updates).

      This strategy has higher priority than REFRESH and cannot be downgraded once set.

  • Method Details

    • values

      public static UIUpdateStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UIUpdateStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null