Class Renderer<SOURCE>

java.lang.Object
com.vaadin.flow.data.renderer.Renderer<SOURCE>
Type Parameters:
SOURCE - the type of the input object used inside the template
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LitRenderer

public abstract class Renderer<SOURCE> extends Object implements Serializable
Base class for all renderers - classes that take a given model object as input and handles their rendering to the client side when requested.
Author:
Vaadin Ltd
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<SOURCE> keyMapper)
    Registers a renderer function to the given container element.
    abstract Rendering<SOURCE>
    render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<SOURCE> keyMapper, String rendererName)
    Registers a renderer function with the given name to the given container element.

    Methods inherited from class java.lang.Object

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

    • Renderer

      public Renderer()
  • Method Details

    • render

      public Rendering<SOURCE> render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<SOURCE> keyMapper)
      Registers a renderer function to the given container element. Creates the setup to handle rendering of individual data items as requested by the renderer function invocation. The renderer function name defaults to "renderer".
      Parameters:
      container - the element which accepts the renderer function on the client.
      keyMapper - mapper used internally to fetch items by key and to provide keys for given items.
      Returns:
      the context of the rendering, that can be used by the components to provide extra customization
    • render

      public abstract Rendering<SOURCE> render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<SOURCE> keyMapper, String rendererName)
      Registers a renderer function with the given name to the given container element. Creates the setup to handle rendering of individual data items as requested by the renderer function invocation.
      Parameters:
      container - the element which accepts the renderer function on the client.
      keyMapper - mapper used internally to fetch items by key and to provide keys for given items.
      rendererName - name of the renderer function the container element accepts
      Returns:
      the context of the rendering, that can be used by the components to provide extra customization