Class EditorRenderer<T>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<T>
io.jmix.groupgridflowui.kit.vaadin.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 com.vaadin.flow.data.renderer.Renderer<T>
implements com.vaadin.flow.data.provider.DataGenerator<T>
Renderer and DataGenerator used by
Grid.Column to 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.
-
Constructor Summary
ConstructorsConstructorDescriptionEditorRenderer(Editor<T> editor, String columnInternalId) Creates a new renderer for a specific column. -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateData(T item, elemental.json.JsonObject jsonObject) voidrefreshData(T item) com.vaadin.flow.data.renderer.Rendering<T>render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<T> keyMapper, String rendererName) 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
renderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataGenerator
destroyAllData, destroyData
-
Constructor Details
-
EditorRenderer
Creates a new renderer for a specific column.- Parameters:
editor- the Grid's editorcolumnInternalId- the internal Id of the column that uses this data generator
-
-
Method Details
-
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
- Specified by:
generateDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
refreshData
- Specified by:
refreshDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
render
public com.vaadin.flow.data.renderer.Rendering<T> render(com.vaadin.flow.dom.Element container, com.vaadin.flow.data.provider.DataKeyMapper<T> keyMapper, String rendererName) - Specified by:
renderin classcom.vaadin.flow.data.renderer.Renderer<T>
-