Search in sources :

Example 1 with TemplateRenderer

use of com.vaadin.flow.data.renderer.TemplateRenderer in project flow-components by vaadin.

the class Grid method addColumn.

/**
 * Adds a new text column to this {@link Grid} with a template renderer,
 * sorting properties and column factory provided. The values inside the
 * renderer are converted to JSON values by using
 * {@link JsonSerializer#toJson(Object)}.
 * <p>
 * <em>NOTE:</em> You can add component columns easily using the
 * {@link #addComponentColumn(ValueProvider)}, but using
 * {@link ComponentRenderer} is not as efficient as the built in renderers
 * or using {@link TemplateRenderer}.
 * <p>
 * This constructor attempts to automatically configure both in-memory and
 * backend sorting using the given sorting properties and matching those
 * with the property names used in the given renderer.
 * <p>
 * <strong>Note:</strong> if a property of the renderer that is used as a
 * sorting property does not extend Comparable, no in-memory sorting is
 * configured for it.
 *
 * <p>
 * Every added column sends data to the client side regardless of its
 * visibility state. Don't add a new column at all or use
 * {@link Grid#removeColumn(Column)} to avoid sending extra data.
 * </p>
 *
 * @see #addColumn(Renderer, String...)
 * @see #removeColumn(Column)
 *
 * @param renderer
 *            the renderer used to create the grid cell structure
 * @param columnFactory
 *            the method that creates a new column instance for this
 *            {@link Grid} instance.
 * @param sortingProperties
 *            the sorting properties to use for this column
 * @return the created column
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
protected <C extends Column<T>> C addColumn(Renderer<T> renderer, BiFunction<Renderer<T>, String, C> columnFactory, String... sortingProperties) {
    C column = addColumn(renderer, columnFactory);
    Map<String, ValueProvider<T, ?>> valueProviders = renderer.getValueProviders();
    Set<String> valueProvidersKeySet = valueProviders.keySet();
    List<String> matchingSortingProperties = Arrays.stream(sortingProperties).filter(valueProvidersKeySet::contains).collect(Collectors.toList());
    column.setSortProperty(matchingSortingProperties.toArray(new String[matchingSortingProperties.size()]));
    Comparator<T> combinedComparator = (a, b) -> 0;
    Comparator nullsLastComparator = Comparator.nullsLast(Comparator.naturalOrder());
    for (String sortProperty : matchingSortingProperties) {
        ValueProvider<T, ?> provider = valueProviders.get(sortProperty);
        combinedComparator = combinedComparator.thenComparing((a, b) -> {
            Object aa = provider.apply(a);
            if (!(aa instanceof Comparable)) {
                return 0;
            }
            Object bb = provider.apply(b);
            return nullsLastComparator.compare(aa, bb);
        });
    }
    return column;
}
Also used : KeyMapper(com.vaadin.flow.data.provider.KeyMapper) ComponentRenderer(com.vaadin.flow.data.renderer.ComponentRenderer) Arrays(java.util.Arrays) DataView(com.vaadin.flow.data.provider.DataView) NpmPackage(com.vaadin.flow.component.dependency.NpmPackage) ComponentUtil(com.vaadin.flow.component.ComponentUtil) HasListDataView(com.vaadin.flow.data.provider.HasListDataView) JsonArray(elemental.json.JsonArray) PropertySet(com.vaadin.flow.data.binder.PropertySet) DataCommunicator(com.vaadin.flow.data.provider.DataCommunicator) JsonValue(elemental.json.JsonValue) SortEvent(com.vaadin.flow.data.event.SortEvent) Map(java.util.Map) Element(com.vaadin.flow.dom.Element) AttachEvent(com.vaadin.flow.component.AttachEvent) DataGenerator(com.vaadin.flow.data.provider.DataGenerator) UpdateQueueData(com.vaadin.flow.component.grid.GridArrayUpdater.UpdateQueueData) JsonType(elemental.json.JsonType) HasStyle(com.vaadin.flow.component.HasStyle) Editor(com.vaadin.flow.component.grid.editor.Editor) Set(java.util.Set) SerializableSupplier(com.vaadin.flow.function.SerializableSupplier) GridContextMenu(com.vaadin.flow.component.grid.contextmenu.GridContextMenu) Serializable(java.io.Serializable) EditorRenderer(com.vaadin.flow.component.grid.editor.EditorRenderer) Stream(java.util.stream.Stream) DetachEvent(com.vaadin.flow.component.DetachEvent) DataProviderListener(com.vaadin.flow.data.provider.DataProviderListener) DataProviderWrapper(com.vaadin.flow.data.provider.DataProviderWrapper) JsModule(com.vaadin.flow.component.dependency.JsModule) InMemoryDataProvider(com.vaadin.flow.data.provider.InMemoryDataProvider) SingleSelectionListener(com.vaadin.flow.data.selection.SingleSelectionListener) DataViewUtils(com.vaadin.flow.data.provider.DataViewUtils) MultiSelect(com.vaadin.flow.data.selection.MultiSelect) SortDirection(com.vaadin.flow.data.provider.SortDirection) EditorImpl(com.vaadin.flow.component.grid.editor.EditorImpl) Single(com.vaadin.flow.data.selection.SelectionModel.Single) SerializableConsumer(com.vaadin.flow.function.SerializableConsumer) SingleSelect(com.vaadin.flow.data.selection.SingleSelect) QuerySortOrder(com.vaadin.flow.data.provider.QuerySortOrder) SerializableBiFunction(com.vaadin.flow.function.SerializableBiFunction) ArrayList(java.util.ArrayList) Tag(com.vaadin.flow.component.Tag) TemplateRenderer(com.vaadin.flow.data.renderer.TemplateRenderer) DropTarget(com.vaadin.flow.component.dnd.DropTarget) Setter(com.vaadin.flow.data.binder.Setter) Update(com.vaadin.flow.data.provider.ArrayUpdater.Update) SerializablePredicate(com.vaadin.flow.function.SerializablePredicate) DragSource(com.vaadin.flow.component.dnd.DragSource) GridLazyDataView(com.vaadin.flow.component.grid.dataview.GridLazyDataView) LitRenderer(com.vaadin.flow.data.renderer.LitRenderer) CompositeDataGenerator(com.vaadin.flow.data.provider.CompositeDataGenerator) ComponentEvent(com.vaadin.flow.component.ComponentEvent) JsonUtils(com.vaadin.flow.internal.JsonUtils) HasTheme(com.vaadin.flow.component.HasTheme) HasLazyDataView(com.vaadin.flow.data.provider.HasLazyDataView) JsonObject(elemental.json.JsonObject) ClientCallable(com.vaadin.flow.component.ClientCallable) SerializableFunction(com.vaadin.flow.function.SerializableFunction) GridListDataView(com.vaadin.flow.component.grid.dataview.GridListDataView) GridDragStartEvent(com.vaadin.flow.component.grid.dnd.GridDragStartEvent) SerializableComparator(com.vaadin.flow.function.SerializableComparator) Component(com.vaadin.flow.component.Component) BiFunction(java.util.function.BiFunction) Registration(com.vaadin.flow.shared.Registration) Json(elemental.json.Json) LoggerFactory(org.slf4j.LoggerFactory) HasDataView(com.vaadin.flow.data.provider.HasDataView) SortNotifier(com.vaadin.flow.data.event.SortEvent.SortNotifier) DataProvider(com.vaadin.flow.data.provider.DataProvider) GridDragEndEvent(com.vaadin.flow.component.grid.dnd.GridDragEndEvent) Synchronize(com.vaadin.flow.component.Synchronize) BackEndDataProvider(com.vaadin.flow.data.provider.BackEndDataProvider) HasSize(com.vaadin.flow.component.HasSize) Query(com.vaadin.flow.data.provider.Query) Collection(java.util.Collection) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) Objects(java.util.Objects) List(java.util.List) Rendering(com.vaadin.flow.data.renderer.Rendering) Optional(java.util.Optional) ArrayUpdater(com.vaadin.flow.data.provider.ArrayUpdater) Renderer(com.vaadin.flow.data.renderer.Renderer) PropertyDefinition(com.vaadin.flow.data.binder.PropertyDefinition) HasDataGenerators(com.vaadin.flow.data.provider.HasDataGenerators) IntStream(java.util.stream.IntStream) ComponentEventListener(com.vaadin.flow.component.ComponentEventListener) ListDataProvider(com.vaadin.flow.data.provider.ListDataProvider) HasValue(com.vaadin.flow.component.HasValue) GridDropEvent(com.vaadin.flow.component.grid.dnd.GridDropEvent) ValueProvider(com.vaadin.flow.function.ValueProvider) Binder(com.vaadin.flow.data.binder.Binder) HashMap(java.util.HashMap) HashSet(java.util.HashSet) GridDropMode(com.vaadin.flow.component.grid.dnd.GridDropMode) MultiSelectionListener(com.vaadin.flow.data.selection.MultiSelectionListener) SelectionModel(com.vaadin.flow.data.selection.SelectionModel) BeanPropertySet(com.vaadin.flow.data.binder.BeanPropertySet) SerializableRunnable(com.vaadin.flow.function.SerializableRunnable) SelectionEvent(com.vaadin.flow.data.selection.SelectionEvent) NoSuchElementException(java.util.NoSuchElementException) DisabledUpdateMode(com.vaadin.flow.dom.DisabledUpdateMode) DataChangeEvent(com.vaadin.flow.data.provider.DataChangeEvent) HasElement(com.vaadin.flow.component.HasElement) Focusable(com.vaadin.flow.component.Focusable) CallbackDataProvider(com.vaadin.flow.data.provider.CallbackDataProvider) ReflectTools(com.vaadin.flow.internal.ReflectTools) SelectionListener(com.vaadin.flow.data.selection.SelectionListener) GridDataView(com.vaadin.flow.component.grid.dataview.GridDataView) JsonSerializer(com.vaadin.flow.internal.JsonSerializer) Comparator(java.util.Comparator) Collections(java.util.Collections) SerializableComparator(com.vaadin.flow.function.SerializableComparator) Comparator(java.util.Comparator) JsonObject(elemental.json.JsonObject) ValueProvider(com.vaadin.flow.function.ValueProvider)

Example 2 with TemplateRenderer

use of com.vaadin.flow.data.renderer.TemplateRenderer in project flow-components by vaadin.

the class GridViewSortingPage method createSorting.

private void createSorting() {
    Div messageDiv = new Div();
    Grid<Person> grid = new Grid<>();
    grid.setItems(getItems());
    grid.setSelectionMode(SelectionMode.NONE);
    grid.addColumn(Person::getFirstName, "firstName").setHeader("Name");
    grid.addColumn(Person::getAge, "age").setHeader("Age");
    grid.addColumn(TemplateRenderer.<Person>of("<div>[[item.street]], number [[item.number]]<br><small>[[item.postalCode]]</small></div>").withProperty("street", person -> person.getAddress().getStreet()).withProperty("number", person -> person.getAddress().getNumber()).withProperty("postalCode", person -> person.getAddress().getPostalCode()), "street", "number").setHeader("Address");
    Checkbox multiSort = new Checkbox("Multiple column sorting enabled");
    multiSort.addValueChangeListener(event -> grid.setMultiSort(event.getValue()));
    grid.addSortListener(event -> {
        String currentSortOrder = grid.getDataCommunicator().getBackEndSorting().stream().map(querySortOrder -> String.format("{sort property: %s, direction: %s}", querySortOrder.getSorted(), querySortOrder.getDirection())).collect(Collectors.joining(", "));
        messageDiv.setText(String.format("Current sort order: %s. Sort originates from the client: %s.", currentSortOrder, event.isFromClient()));
    });
    // you can set the sort order from server-side with the grid.sort method
    NativeButton invertAllSortings = new NativeButton("Invert all sort directions", event -> {
        List<GridSortOrder<Person>> orderList = grid.getSortOrder();
        List<GridSortOrder<Person>> newOrderList = new ArrayList<>(orderList.size());
        for (GridSortOrder<Person> sort : orderList) {
            newOrderList.add(new GridSortOrder<>(sort.getSorted(), sort.getDirection().getOpposite()));
        }
        grid.sort(newOrderList);
    });
    NativeButton resetAllSortings = new NativeButton("Reset all sortings", event -> grid.sort(null));
    grid.setId("grid-sortable-columns");
    multiSort.setId("grid-multi-sort-toggle");
    invertAllSortings.setId("grid-sortable-columns-invert-sortings");
    resetAllSortings.setId("grid-sortable-columns-reset-sortings");
    messageDiv.setId("grid-sortable-columns-message");
    addCard("Sorting", "Grid with sortable columns", grid, multiSort, invertAllSortings, resetAllSortings, messageDiv);
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox) List(java.util.List) Person(com.vaadin.flow.data.bean.Person) Grid(com.vaadin.flow.component.grid.Grid) TemplateRenderer(com.vaadin.flow.data.renderer.TemplateRenderer) Div(com.vaadin.flow.component.html.Div) NativeButton(com.vaadin.flow.component.html.NativeButton) SelectionMode(com.vaadin.flow.component.grid.Grid.SelectionMode) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) GridSortOrder(com.vaadin.flow.component.grid.GridSortOrder) Route(com.vaadin.flow.router.Route) NativeButton(com.vaadin.flow.component.html.NativeButton) GridSortOrder(com.vaadin.flow.component.grid.GridSortOrder) Grid(com.vaadin.flow.component.grid.Grid) ArrayList(java.util.ArrayList) Div(com.vaadin.flow.component.html.Div) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) Person(com.vaadin.flow.data.bean.Person)

Example 3 with TemplateRenderer

use of com.vaadin.flow.data.renderer.TemplateRenderer in project flow-components by vaadin.

the class GridTestPage method createGridWithComponentRenderers.

private void createGridWithComponentRenderers() {
    Grid<Item> grid = new Grid<>();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    AtomicBoolean usingFirstList = new AtomicBoolean(true);
    List<Item> firstList = generateItems(20, 0);
    List<Item> secondList = generateItems(10, 20);
    grid.setItems(firstList);
    grid.addColumn(new ComponentRenderer<>(item -> {
        Label label = new Label(item.getName());
        label.setId("grid-with-component-renderers-item-name-" + item.getNumber());
        return label;
    })).setKey("name").setHeader("Name");
    grid.addColumn(new ComponentRenderer<>(item -> {
        Label label = new Label(String.valueOf(item.getNumber()));
        label.setId("grid-with-component-renderers-item-number-" + item.getNumber());
        return label;
    })).setKey("number").setHeader("Number");
    grid.addColumn(new ComponentRenderer<>(item -> {
        NativeButton remove = new NativeButton("Remove", evt -> {
            if (usingFirstList.get()) {
                firstList.remove(item);
            } else {
                secondList.remove(item);
            }
            grid.getDataProvider().refreshAll();
        });
        remove.setId("grid-with-component-renderers-remove-" + item.getNumber());
        return remove;
    })).setKey("remove");
    grid.addColumn(TemplateRenderer.<Item>of("hidden")).setHeader("hidden").setKey("hidden").setVisible(false);
    grid.setId("grid-with-component-renderers");
    grid.setWidth("500px");
    grid.setHeight("500px");
    NativeButton changeList = new NativeButton("Change list", evt -> {
        if (usingFirstList.get()) {
            grid.setItems(secondList);
        } else {
            grid.setItems(firstList);
        }
        usingFirstList.set(!usingFirstList.get());
    });
    changeList.setId("grid-with-component-renderers-change-list");
    NativeButton toggleColumnOrdering = new NativeButton("Toggle column ordering", evt -> {
        grid.setColumnReorderingAllowed(!grid.isColumnReorderingAllowed());
    });
    toggleColumnOrdering.setId("toggle-column-ordering");
    NativeButton setReorderListener = new NativeButton("Set reorder listener", evt -> {
        grid.addColumnReorderListener(e -> {
            if (e.isFromClient()) {
                List<Column<Item>> columnList = e.getColumns().stream().collect(Collectors.toList());
                // Reorder columns in the list
                Collections.swap(columnList, 1, 2);
                grid.setColumnOrder(columnList);
            }
        });
    });
    setReorderListener.setId("set-reorder-listener");
    Span currentColumnOrdering = new Span();
    currentColumnOrdering.setId("current-column-ordering");
    grid.addColumnReorderListener(e -> currentColumnOrdering.setText(e.getColumns().stream().map(Column::getKey).collect(Collectors.joining(", "))));
    add(grid, changeList, toggleColumnOrdering, setReorderListener, currentColumnOrdering);
}
Also used : ComponentRenderer(com.vaadin.flow.data.renderer.ComponentRenderer) Grid(com.vaadin.flow.component.grid.Grid) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Div(com.vaadin.flow.component.html.Div) Label(com.vaadin.flow.component.html.Label) NativeButton(com.vaadin.flow.component.html.NativeButton) Collectors(java.util.stream.Collectors) Serializable(java.io.Serializable) ArrayList(java.util.ArrayList) Route(com.vaadin.flow.router.Route) List(java.util.List) Column(com.vaadin.flow.component.grid.Grid.Column) TemplateRenderer(com.vaadin.flow.data.renderer.TemplateRenderer) HasComponents(com.vaadin.flow.component.HasComponents) Collections(java.util.Collections) Span(com.vaadin.flow.component.html.Span) NativeButton(com.vaadin.flow.component.html.NativeButton) Grid(com.vaadin.flow.component.grid.Grid) Label(com.vaadin.flow.component.html.Label) Span(com.vaadin.flow.component.html.Span) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ComponentRenderer(com.vaadin.flow.data.renderer.ComponentRenderer) Column(com.vaadin.flow.component.grid.Grid.Column)

Example 4 with TemplateRenderer

use of com.vaadin.flow.data.renderer.TemplateRenderer in project flow-components by vaadin.

the class IronListView method createDisabledStringsList.

private void createDisabledStringsList() {
    IronList<String> list = new IronList<>();
    list.setHeight("400px");
    list.getStyle().set("border", "1px solid lightgray");
    Div removalResult = new Div();
    removalResult.setId("disabled-removal-result");
    DataProvider<String, ?> dataProvider = DataProvider.fromCallbacks(query -> queryStringsFromDatabase(query), query -> countStringsFromDatabase(query));
    list.setDataProvider(dataProvider);
    // Disable the list so that scrolling still works but events are not
    // handled
    list.setEnabled(false);
    /*
         * The name of the event handlers defined at 'on-click' are used inside
         * the 'withEventHandler' calls.
         */
    list.setRenderer(TemplateRenderer.<String>of("<div style='display:flex; justify-content:space-between; padding:10px;'>" + "<div style='flex-grow:1'>[[item.name]]</div>" + "<div><button on-click='remove' style='color:red'>X</button></div>" + "<div>").withProperty("name", ValueProvider.identity()).withEventHandler("remove", item -> {
        removalResult.setText(item);
    }));
    NativeButton switchEnabled = new NativeButton("Switch enabled state", event -> list.setEnabled(!list.isEnabled()));
    list.setId("disabled-list-with-templates");
    switchEnabled.setId("switch-enabled-state-string-list");
    addCard("Using templates", "Using disabled list with templates", new Label("Rank up/down your favorite Lord of the Rings characters"), list, removalResult, switchEnabled);
}
Also used : Div(com.vaadin.flow.component.html.Div) ComponentRenderer(com.vaadin.flow.data.renderer.ComponentRenderer) Arrays(java.util.Arrays) Image(com.vaadin.flow.component.html.Image) Component(com.vaadin.flow.component.Component) ValueProvider(com.vaadin.flow.function.ValueProvider) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) Div(com.vaadin.flow.component.html.Div) Label(com.vaadin.flow.component.html.Label) NativeButton(com.vaadin.flow.component.html.NativeButton) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Route(com.vaadin.flow.router.Route) SecureRandom(java.security.SecureRandom) HashSet(java.util.HashSet) Faker(com.github.javafaker.Faker) DataProvider(com.vaadin.flow.data.provider.DataProvider) TemplateRenderer(com.vaadin.flow.data.renderer.TemplateRenderer) Query(com.vaadin.flow.data.provider.Query) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Set(java.util.Set) H2(com.vaadin.flow.component.html.H2) Serializable(java.io.Serializable) List(java.util.List) Stream(java.util.stream.Stream) IronList(com.vaadin.flow.component.ironlist.IronList) Collections(java.util.Collections) NativeButton(com.vaadin.flow.component.html.NativeButton) Label(com.vaadin.flow.component.html.Label) IronList(com.vaadin.flow.component.ironlist.IronList)

Example 5 with TemplateRenderer

use of com.vaadin.flow.data.renderer.TemplateRenderer in project flow-components by vaadin.

the class IronListView method createRankedListWithEventHandling.

private void createRankedListWithEventHandling() {
    IronList<String> list = new IronList<>();
    list.setHeight("400px");
    list.getStyle().set("border", "1px solid lightgray");
    List<String> items = getLordOfTheRingsCharacters();
    list.setItems(items);
    /*
         * The name of the event handlers defined at 'on-click' are used inside
         * the 'withEventHandler' calls.
         */
    list.setRenderer(TemplateRenderer.<String>of("<div style='display:flex; justify-content:space-between; padding:10px;'>" + "<div style='flex-grow:1'>#[[item.rank]]: [[item.name]]</div>" + "<div><button on-click='up' hidden='[[item.upHidden]]'>&uarr;</button>" + "<button on-click='down' hidden='[[item.downHidden]]'>&darr;</button>" + "<button on-click='remove' style='color:red'>X</button></div>" + "<div>").withProperty("name", ValueProvider.identity()).withProperty("rank", item -> items.indexOf(item) + 1).withProperty("upHidden", item -> items.indexOf(item) == 0).withProperty("downHidden", item -> items.indexOf(item) == items.size() - 1).withEventHandler("up", item -> {
        int previousRank = items.indexOf(item);
        if (previousRank == 0) {
            return;
        }
        String previousItem = items.set(previousRank - 1, item);
        items.set(previousRank, previousItem);
        list.getDataCommunicator().reset();
    }).withEventHandler("down", item -> {
        int previousRank = items.indexOf(item);
        if (previousRank == items.size() - 1) {
            return;
        }
        String previousItem = items.set(previousRank + 1, item);
        items.set(previousRank, previousItem);
        list.getDataCommunicator().reset();
    }).withEventHandler("remove", item -> {
        items.remove(item);
        list.getDataCommunicator().reset();
    }));
    list.setId("using-events-with-templates");
    addCard("Using templates", "Using events with templates", new Label("Rank up/down your favorite Lord of the Rings characters"), list, new NativeButton("Reset", evt -> {
        items.clear();
        items.addAll(getLordOfTheRingsCharacters());
        list.getDataCommunicator().reset();
    }));
}
Also used : ComponentRenderer(com.vaadin.flow.data.renderer.ComponentRenderer) Arrays(java.util.Arrays) Image(com.vaadin.flow.component.html.Image) Component(com.vaadin.flow.component.Component) ValueProvider(com.vaadin.flow.function.ValueProvider) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) Div(com.vaadin.flow.component.html.Div) Label(com.vaadin.flow.component.html.Label) NativeButton(com.vaadin.flow.component.html.NativeButton) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Route(com.vaadin.flow.router.Route) SecureRandom(java.security.SecureRandom) HashSet(java.util.HashSet) Faker(com.github.javafaker.Faker) DataProvider(com.vaadin.flow.data.provider.DataProvider) TemplateRenderer(com.vaadin.flow.data.renderer.TemplateRenderer) Query(com.vaadin.flow.data.provider.Query) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Set(java.util.Set) H2(com.vaadin.flow.component.html.H2) Serializable(java.io.Serializable) List(java.util.List) Stream(java.util.stream.Stream) IronList(com.vaadin.flow.component.ironlist.IronList) Collections(java.util.Collections) NativeButton(com.vaadin.flow.component.html.NativeButton) Label(com.vaadin.flow.component.html.Label) IronList(com.vaadin.flow.component.ironlist.IronList)

Aggregations

TemplateRenderer (com.vaadin.flow.data.renderer.TemplateRenderer)12 ArrayList (java.util.ArrayList)12 List (java.util.List)12 Div (com.vaadin.flow.component.html.Div)11 ComponentRenderer (com.vaadin.flow.data.renderer.ComponentRenderer)11 Route (com.vaadin.flow.router.Route)11 NativeButton (com.vaadin.flow.component.html.NativeButton)10 DataProvider (com.vaadin.flow.data.provider.DataProvider)9 Query (com.vaadin.flow.data.provider.Query)9 ValueProvider (com.vaadin.flow.function.ValueProvider)9 Arrays (java.util.Arrays)9 Collectors (java.util.stream.Collectors)8 Label (com.vaadin.flow.component.html.Label)6 Serializable (java.io.Serializable)6 Collections (java.util.Collections)6 IntStream (java.util.stream.IntStream)6 Faker (com.github.javafaker.Faker)5 HasComponents (com.vaadin.flow.component.HasComponents)5 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)5 Renderer (com.vaadin.flow.data.renderer.Renderer)5