Class BasicRenderer<SOURCE,TARGET>

Type Parameters:
SOURCE - the type of the item used inside the renderer
TARGET - the type of the output object, such as Number or LocalDate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LocalDateRenderer, LocalDateTimeRenderer, NativeButtonRenderer, NumberRenderer, TextRenderer

public abstract class BasicRenderer<SOURCE,TARGET> extends ComponentRenderer<Component,SOURCE>
Abstract renderer used as the base implementation for renderers that outputs a simple value in the UI, such as NumberRenderer and LocalDateRenderer. For components that use a client-side renderer, such as Grid or ComboBox, the BasicRenderer works as a LitRenderer with a preconfigured template. It also implements the ComponentRenderer API, so components that use renderers server-side to generate content, such as RadioButtonGroup or ListBox, can use it as well.
Since:
22.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • BasicRenderer

      protected BasicRenderer(ValueProvider<SOURCE,TARGET> valueProvider)
      Builds a new renderer using the value provider as the source of values to be rendered.
      Parameters:
      valueProvider - the callback to provide a objects to the renderer, not null
  • Method Details