Package com.vaadin.flow.data.renderer
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:
ColumnPathRenderer
,EditorRenderer
,LitRenderer
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
-
Method Summary
Modifier and TypeMethodDescriptionrender
(Element container, DataKeyMapper<SOURCE> keyMapper) Registers a renderer function to the given container element.render
(Element container, DataKeyMapper<SOURCE> keyMapper, String rendererName) Registers a renderer function with the given name to the given container element.
-
Constructor Details
-
Renderer
public Renderer()
-
-
Method Details
-
render
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(Element container, 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
-