Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.test</groupId>
<artifactId>testbench-rpc</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -218,6 +218,11 @@
<configuration>
<licenseName>apache_v2</licenseName>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<excludes>
<exclude>**/main/dev-bundle/**</exclude>
<exclude>**/main/bundles/**</exclude>
<exclude>**/main/frontend/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2022 - 2025 Flowing Code
* Copyright (C) 2022 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,8 @@
*/
package com.flowingcode.vaadin.addons.gridhelpers.it;

import static org.junit.Assert.assertEquals;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import com.flowingcode.vaadin.addons.gridhelpers.it.HeaderFooterStylesCallables.HeaderCellWrapper;
import com.flowingcode.vaadin.addons.gridhelpers.it.HeaderFooterStylesCallables.HeaderRowWrapper;
import com.flowingcode.vaadin.testbench.rpc.HasRpcSupport;
Expand Down Expand Up @@ -54,11 +55,11 @@ public void testHeaderClassesApplied() {
row1.getCell(i).setClassName("row1-cell" + i);
}

assertEquals("row0-cell0", grid.getHeaderCellAt(0, 0).getAttribute("class"));
assertEquals("row0-cell1", grid.getHeaderCellAt(0, 1).getAttribute("class"));
assertThat(grid.getHeaderCellAt(0, 0).getAttribute("class"), containsString("row0-cell0"));
assertThat(grid.getHeaderCellAt(0, 1).getAttribute("class"), containsString("row0-cell1"));

for (int i = 0; i < 5; i++) {
assertEquals("row1-cell" + i, grid.getHeaderCellAt(1, i).getAttribute("class"));
assertThat(grid.getHeaderCellAt(1, i).getAttribute("class"), containsString("row1-cell" + i));
}
}

Expand All @@ -72,8 +73,8 @@ public void testHeaderCellMutability() {
$server.setColumnOrder(2, 3, 0, 1, 4);
header0.setClassName("row0-cell0");
header1.setClassName("row0-cell1");
assertEquals("row0-cell1", grid.getHeaderCellAt(0, 0).getAttribute("class"));
assertEquals("row0-cell0", grid.getHeaderCellAt(0, 1).getAttribute("class"));
assertThat(grid.getHeaderCellAt(0, 0).getAttribute("class"), containsString("row0-cell1"));
assertThat(grid.getHeaderCellAt(0, 1).getAttribute("class"), containsString("row0-cell0"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2022 - 2025 Flowing Code
* Copyright (C) 2022 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,13 +21,13 @@

import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.GridStylesHelper;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.Grid.Column;
import com.vaadin.flow.component.grid.HeaderRow;
import com.vaadin.flow.component.grid.HeaderRow.HeaderCell;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -38,7 +38,7 @@
import lombok.experimental.ExtensionMethod;

@SuppressWarnings("serial")
@Route(HeaderFooterStylesView.ROUTE)
@InstrumentedRoute(HeaderFooterStylesView.ROUTE)
@ExtensionMethod(GridHelper.class)
public class HeaderFooterStylesView extends Div implements HeaderFooterStylesCallables {

Expand All @@ -59,7 +59,7 @@ public HeaderFooterStylesView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return HeaderFooterStylesCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2022 - 2024 Flowing Code
* Copyright (C) 2022 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,13 +21,13 @@

import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.HeightMode;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.BeforeEvent;
import com.vaadin.flow.router.HasUrlParameter;
import com.vaadin.flow.router.OptionalParameter;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.Arrays;
Expand All @@ -36,7 +36,7 @@
import lombok.experimental.ExtensionMethod;

@ExtensionMethod(GridHelper.class)
@Route(HeightByRowsITView.ROUTE)
@InstrumentedRoute(HeightByRowsITView.ROUTE)
public class HeightByRowsITView extends VerticalLayout
implements HeightByRowsITViewCallables, HasUrlParameter<String> {

Expand Down Expand Up @@ -86,7 +86,7 @@ public void setParameter(BeforeEvent event, @OptionalParameter String parameter)
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return HeightByRowsITViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2022 - 2024 Flowing Code
* Copyright (C) 2022 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,15 +23,15 @@
import com.flowingcode.vaadin.addons.gridhelpers.GridRadioSelectionColumn;
import com.flowingcode.vaadin.addons.gridhelpers.Person;
import com.flowingcode.vaadin.addons.gridhelpers.TestData;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.flowingcode.vaadin.testbench.rpc.JsonArrayList;
import com.vaadin.flow.component.ClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.Grid.Column;
import com.vaadin.flow.component.grid.Grid.SelectionMode;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.data.provider.ListDataProvider;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -40,7 +40,7 @@
import lombok.experimental.ExtensionMethod;

@SuppressWarnings("serial")
@Route("it")
@InstrumentedRoute("it")
@ExtensionMethod(GridHelper.class)
public class IntegrationView extends Div implements IntegrationViewCallables {

Expand Down Expand Up @@ -77,7 +77,7 @@ public IntegrationView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return IntegrationViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2022 - 2024 Flowing Code
* Copyright (C) 2022 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,10 +22,10 @@
import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.GridResponsiveStep;
import com.flowingcode.vaadin.addons.gridhelpers.GridResponsiveStep.GridResponsiveStepListenerRegistration;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -36,7 +36,7 @@
import lombok.experimental.ExtensionMethod;

@ExtensionMethod(GridHelper.class)
@Route(ResponsiveGridITView.ROUTE)
@InstrumentedRoute(ResponsiveGridITView.ROUTE)
public class ResponsiveGridITView extends VerticalLayout implements ResponsiveGridITViewCallables {

public static final String ROUTE = "it/responsive";
Expand All @@ -60,7 +60,7 @@ public ResponsiveGridITView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return ResponsiveGridITViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*-
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2021 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package com.flowingcode.vaadin.addons.gridhelpers.it;

import com.flowingcode.vaadin.jsonmigration.InstrumentationViewInitializer;
import com.vaadin.flow.server.ServiceInitEvent;

@SuppressWarnings("serial")
public class ViewInitializerImpl extends InstrumentationViewInitializer {

@Override
public void serviceInit(ServiceInitEvent event) {
registerInstrumentedRoute(IntegrationView.class);
registerInstrumentedRoute(HeightByRowsITView.class);
registerInstrumentedRoute(HeaderFooterStylesView.class);
registerInstrumentedRoute(ResponsiveGridITView.class);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.flowingcode.vaadin.addons.gridhelpers.it.ViewInitializerImpl