Class EditorRenderer<T>
- java.lang.Object
-
- com.vaadin.flow.data.renderer.Renderer<T>
-
- com.vaadin.flow.component.grid.editor.EditorRenderer<T>
-
- Type Parameters:
T- the type of the object being processed
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataGenerator<T>,Serializable
public class EditorRenderer<T> extends Renderer<T> implements com.vaadin.flow.data.provider.DataGenerator<T>
Renderer and DataGenerator used byGrid.Columnto control the state of the editor components.Components are created during the
generateData(Object, JsonObject)calls, and the proper data is sent to the client-side to be rendered.- Author:
- Vaadin Ltd.
- See Also:
Grid.Column.setEditorComponent(Component),Grid.Column.setEditorComponent(SerializableFunction), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EditorRenderer(Editor<T> editor, String columnInternalId)Creates a new renderer for a specific column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateData(T item, elemental.json.JsonObject jsonObject)voidrefreshData(T item)Rendering<T>render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<T> keyMapper, com.vaadin.flow.dom.Element contentTemplate)voidsetComponentFunction(com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component> componentFunction)Sets the function that creates components to be used as editors for the column.-
Methods inherited from class com.vaadin.flow.data.renderer.Renderer
getEventHandlers, getValueProviders, render, setEventHandler, setProperty
-
-
-
-
Method Detail
-
setComponentFunction
public void setComponentFunction(com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component> componentFunction)
Sets the function that creates components to be used as editors for the column. When set tonull, an empty component is used instead.- Parameters:
componentFunction- the function that generates editor components
-
generateData
public void generateData(T item, elemental.json.JsonObject jsonObject)
- Specified by:
generateDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
refreshData
public void refreshData(T item)
- Specified by:
refreshDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
-