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 Summary

    Modifier and Type
    Method
    Description
    static <T> String
    _getPresentationValue(com.vaadin.flow.data.renderer.Renderer<T> renderer, T rowObject)
    Returns the output of this renderer for given rowObject formatted as close as possible to the client-side output.
    static <T> String
    renderLitTemplate(String template, Map<String,? extends com.vaadin.flow.function.ValueProvider<T,?>> valueProviders, T item)
    Renders the given lit template, replacing each ${item.key} with the output of the corresponding value provider.
    static <T> String
    renderText(com.vaadin.flow.data.renderer.TextRenderer<T> renderer, T item)
    Returns the text rendered for given item.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • _getPresentationValue

      public static <T> String _getPresentationValue(com.vaadin.flow.data.renderer.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 com.vaadin.flow.function.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(com.vaadin.flow.data.renderer.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.