Package com.vaadin.flow.component.grid
Class ColumnPathRenderer<SOURCE>
- java.lang.Object
-
- com.vaadin.flow.data.renderer.Renderer<SOURCE>
-
- com.vaadin.flow.component.grid.ColumnPathRenderer<SOURCE>
-
- Type Parameters:
SOURCE- the object model type
- All Implemented Interfaces:
Serializable
public class ColumnPathRenderer<SOURCE> extends Renderer<SOURCE>
Renderer for columns that doesn't use any template for rendering its contents (only the value from the object model). In such cases, atemplateelement is not needed on the client-side, only thepathproperty.- Author:
- Vaadin Ltd.
- See Also:
Grid.addColumn(ValueProvider), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ColumnPathRenderer(String property, ValueProvider<SOURCE,?> provider)Creates a new renderer based on the property and the value provider for that property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rendering<SOURCE>render(Element container, DataKeyMapper<SOURCE> keyMapper)Handles the rendering of the model objects by creating a new<template>element in the given container.Rendering<SOURCE>render(Element container, DataKeyMapper<SOURCE> keyMapper, Element contentTemplate)Handles the rendering of the model objects by using the given<template>element in the given container.-
Methods inherited from class com.vaadin.flow.data.renderer.Renderer
getEventHandlers, getValueProviders, setEventHandler, setProperty
-
-
-
-
Constructor Detail
-
ColumnPathRenderer
public ColumnPathRenderer(String property, ValueProvider<SOURCE,?> provider)
Creates a new renderer based on the property and the value provider for that property.- Parameters:
property- the property nameprovider- the value provider for the property
-
-
Method Detail
-
render
public Rendering<SOURCE> render(Element container, DataKeyMapper<SOURCE> keyMapper)
Description copied from class:RendererHandles the rendering of the model objects by creating a new<template>element in the given container.- Overrides:
renderin classRenderer<SOURCE>- Parameters:
container- the element in which the template will be attached tokeyMapper- mapper used internally to fetch items by key and to provide keys for given items. It is required when either event handlers orDataGeneratorare supported- Returns:
- the context of the rendering, that can be used by the components to provide extra customization
-
render
public Rendering<SOURCE> render(Element container, DataKeyMapper<SOURCE> keyMapper, Element contentTemplate)
Description copied from class:RendererHandles the rendering of the model objects by using the given<template>element in the given container.Subclasses of Renderer usually override this method to provide additional features.
- Overrides:
renderin classRenderer<SOURCE>- Parameters:
container- the element in which the template will be attached to, notnullkeyMapper- mapper used internally to fetch items by key and to provide keys for given items. It is required when either event handlers orDataGeneratorare supportedcontentTemplate- the<template>element to be used for rendering in the container, notnull- Returns:
- the context of the rendering, that can be used by the components to provide extra customization
-
-