All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bklab.flow.base.HasDataViewFactory Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.flow.base;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.data.provider.DataProvider;
import com.vaadin.flow.data.provider.DataView;
import com.vaadin.flow.data.provider.HasDataView;
import com.vaadin.flow.data.provider.InMemoryDataProvider;
import org.bklab.flow.IFlowFactory;

@SuppressWarnings("unchecked")
public interface HasDataViewFactory,
        C extends Component & HasDataView,
        E extends HasDataViewFactory> extends IFlowFactory {

    default E setItems(DataProvider dataProvider) {
        get().setItems(dataProvider);
        return (E) this;
    }

    default E setItems(InMemoryDataProvider dataProvider) {
        //noinspection rawtypes
        this.setItems((DataProvider) dataProvider);
        return (E) this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy