private Collection<DataGenerator<T>> generators = new LinkedHashSet<>();
private ActiveDataHandler handler = new ActiveDataHandler();
- private DataSource<T> dataSource;
+ private DataSource<T> dataSource = DataSource.create();
private DataKeyMapper<T> keyMapper;
private boolean reset = false;
import com.vaadin.server.AbstractExtension;
import com.vaadin.server.KeyMapper;
import com.vaadin.server.data.DataGenerator;
-import com.vaadin.server.data.DataSource;
import com.vaadin.server.data.SortOrder;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.data.DataCommunicatorConstants;
*/
public Grid() {
setSelectionModel(new SingleSelection<>(this));
- setDataSource(DataSource.create());
registerRpc(new GridServerRpcImpl());
detailsManager = new DetailsManager<>();
addExtension(detailsManager);
*
* @return the new column
*/
- public <V> Column<T, V> addColumn(String caption, Function<T, ? extends V> valueProvider,
- Renderer<V> renderer) {
+ public <V> Column<T, V> addColumn(String caption,
+ Function<T, ? extends V> valueProvider, Renderer<V> renderer) {
Column<T, V> c = new Column<>(caption, valueProvider, renderer);
c.extend(this);