Class ComponentDataGenerator<T>

  • Type Parameters:
    T - the date type
    All Implemented Interfaces:
    DataGenerator<T>, Serializable

    public class ComponentDataGenerator<T>
    extends AbstractComponentDataGenerator<T>
    A DataGenerator that manages the creation and passivation of components generated by ComponentRenderers. It also manages the generation of the nodeId property needed by the flow-component-renderer webcomponent.

    This class is used internally by listing components that support ComponentRenderers.

    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Detail

      • ComponentDataGenerator

        public ComponentDataGenerator​(ComponentRenderer<? extends Component,​T> componentRenderer,
                                      ValueProvider<T,​String> keyMapper)
        Creates a new generator.
        Parameters:
        componentRenderer - the renderer used to produce components based on data items
        keyMapper - the DataKeyMapper used to fetch keys for items