Interface LComponentManagementRegistry

All Known Implementing Classes:
LDefaultComponentManagementRegistry

public interface LComponentManagementRegistry
Used for tracking components (on the client).

Links components from server (Java) and client (JS) so that they can be reused and/or manipulated after creation.

  • Method Details

    • writeOptionsOptionalNextParameter

      String writeOptionsOptionalNextParameter(LComponentOptions<?> options)
    • writeOptions

      String writeOptions(LComponentOptions<?> options)
    • writeOptionsOrEmptyObject

      String writeOptionsOrEmptyObject(LComponentOptions<?> options)
    • add

      <C extends LComponent<C>> C add(C component, String jsConstructorCallExpression, Object... parameters)
      Creates the component on the client side and tracks it.
    • clientComponentJsAccessor

      String clientComponentJsAccessor(LComponent<?> component)
      Returns an expression to access the component on the client with JavaScript
    • execJs

      com.vaadin.flow.component.page.PendingJavaScriptResult execJs(String js, Object... params)
      Wrapper for Element.executeJs(String, Object...).

      Usage is normally not recommended however there are some corner cases where it's required.

    • remove

      default <C extends LComponent<C>> void remove(C component)
      Calls remove(LComponent, boolean) with freeUpClientWhenNoMatch = true
      See Also:
    • remove

      <C extends LComponent<C>> void remove(C component, boolean freeUpClientWhenNoMatch)
      Removes the tracked component from the client.

      If the component can't be found freeUpClient() is called when specified.

    • freeUpClient

      void freeUpClient()
      Tries to free up unused components on the client.
    • clearAll

      void clearAll()
      Clears all tracked elements.