Class GroupDataGridColumnComponentRenderer<COMPONENT extends com.vaadin.flow.component.Component,E>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<SOURCE>
com.vaadin.flow.data.renderer.LitRenderer<SOURCE>
com.vaadin.flow.data.renderer.ComponentRenderer<COMPONENT,E>
io.jmix.groupgridflowui.component.renderer.GroupDataGridColumnComponentRenderer<COMPONENT,E>
- Type Parameters:
COMPONENT- the component type to renderE- the entity type
- All Implemented Interfaces:
GroupRenderer,HasGroupDataGrid<E>,Serializable
public class GroupDataGridColumnComponentRenderer<COMPONENT extends com.vaadin.flow.component.Component,E>
extends com.vaadin.flow.data.renderer.ComponentRenderer<COMPONENT,E>
implements HasGroupDataGrid<E>, GroupRenderer
A renderer that renders a component inside a toggler for each group item.
For instance:
@Supply(to = "customersDataGrid.group", subject = "renderer")
public Renderer<Customer> supplyRendererToGroupColumn() {
return new GroupDataGridColumnComponentRenderer<>(groupInfo -> {
if (groupInfo.getProperty().is("grade")) {
Grade grade = groupInfo.getValue();
return createGradeLayout(grade);
}
if (groupInfo.getProperty().is("country")) {
String name = groupInfo.getValue().toString();
return createCountryLayout(name);
}
return null;
});
}
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGroupDataGridColumnComponentRenderer(com.vaadin.flow.function.ValueProvider<GroupInfo, COMPONENT> componentProvider) -
Method Summary
Modifier and TypeMethodDescriptioncreateComponent(E item) protected StringgenerateToggleClassName(E item) protected StringCAUTION! Copied fromcom.vaadin.flow.component.treegrid.HierarchyColumnComponentRenderer#getTemplateExpression()voidsetGroupDataGrid(GroupDataGrid<E> groupDataGrid) Sets theGroupDataGrid.Methods inherited from class com.vaadin.flow.data.renderer.ComponentRenderer
render, updateComponentMethods inherited from class com.vaadin.flow.data.renderer.LitRenderer
getValueProviders, of, withFunction, withFunction, withPropertyMethods inherited from class com.vaadin.flow.data.renderer.Renderer
render
-
Field Details
-
groupDataGrid
-
componentProvider
-
-
Constructor Details
-
GroupDataGridColumnComponentRenderer
-
-
Method Details
-
getGroupDataGrid
- Specified by:
getGroupDataGridin interfaceHasGroupDataGrid<COMPONENT extends com.vaadin.flow.component.Component>- Returns:
- the group data grid
-
setGroupDataGrid
Description copied from interface:HasGroupDataGridSets theGroupDataGrid.- Specified by:
setGroupDataGridin interfaceHasGroupDataGrid<COMPONENT extends com.vaadin.flow.component.Component>- Parameters:
groupDataGrid- the group data grid to set
-
createComponent
-
generateToggleClassName
-
getTemplateExpression
CAUTION! Copied fromcom.vaadin.flow.component.treegrid.HierarchyColumnComponentRenderer#getTemplateExpression()
-