Class Renderers

java.lang.Object
com.vaadin.browserless.internal.Renderers

public final class Renderers extends Object
Functions for computing the output of renderers.

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

  • Method Details

    • _getPresentationValue

      public static <T> String _getPresentationValue(Renderer<T> renderer, T rowObject)
      Returns the output of this renderer for given rowObject formatted as close as possible to the client-side output.
      Type Parameters:
      T - the item type.
      Parameters:
      renderer - the renderer, not null.
      rowObject - the item to render.
      Returns:
      the rendered value, or null if the renderer is not supported.
    • renderLitTemplate

      public static <T> String renderLitTemplate(String template, Map<String,? extends ValueProvider<T,?>> valueProviders, T item)
      Renders the given lit template, replacing each ${item.key} with the output of the corresponding value provider.
      Type Parameters:
      T - the item type.
      Parameters:
      template - the lit template expression.
      valueProviders - the value providers, keyed by property name.
      item - the item to render.
      Returns:
      the rendered template.
    • renderText

      public static <T> String renderText(TextRenderer<T> renderer, T item)
      Returns the text rendered for given item.
      Type Parameters:
      T - the item type.
      Parameters:
      renderer - the text renderer, not null.
      item - the item to render.
      Returns:
      the rendered text.