From 20ed8b863d24f48afab5d510f5caf1fbdadeeb19 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Wed, 7 Jan 2015 15:58:40 +0200 Subject: [PATCH] Change getColumnProperty to getPropertyId in Grid Column (#15512) Change-Id: I89a8ccbb918301abed66adcb0d6246c8db0585a5 --- .../com/vaadin/data/RpcDataProviderExtension.java | 4 ++-- server/src/com/vaadin/ui/Grid.java | 14 +++++++------- .../tests/components/grid/GridColumnExpand.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java index 2b3e00e6f0..c968cb1888 100644 --- a/server/src/com/vaadin/data/RpcDataProviderExtension.java +++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java @@ -762,7 +762,7 @@ public class RpcDataProviderExtension extends AbstractExtension { Grid grid = getGrid(); for (Column column : columns) { - Object propertyId = column.getColumnProperty(); + Object propertyId = column.getPropertyId(); Object propertyValue = item.getItemProperty(propertyId).getValue(); JsonValue encodedValue = encodeValue(propertyValue, @@ -794,7 +794,7 @@ public class RpcDataProviderExtension extends AbstractExtension { JsonObject rowObject, Collection columns) { JsonObject cellStyles = null; for (Column column : columns) { - Object propertyId = column.getColumnProperty(); + Object propertyId = column.getPropertyId(); cellReference.set(propertyId); String style = generator.getStyle(cellReference); if (style != null) { diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index d61458297a..5b29d1f10b 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -1781,7 +1781,7 @@ public class Grid extends AbstractComponent implements SelectionNotifier, /** * Backing property for column */ - private final Object columnProperty; + private final Object propertyId; private Converter converter; @@ -1799,13 +1799,13 @@ public class Grid extends AbstractComponent implements SelectionNotifier, * The grid this column belongs to. Should not be null. * @param state * the shared state of this column - * @param columnProperty + * @param propertyId * the backing property id for this column */ - Column(Grid grid, GridColumnState state, Object columnProperty) { + Column(Grid grid, GridColumnState state, Object propertyId) { this.grid = grid; this.state = state; - this.columnProperty = columnProperty; + this.propertyId = propertyId; internalSetRenderer(new TextRenderer()); } @@ -1824,8 +1824,8 @@ public class Grid extends AbstractComponent implements SelectionNotifier, * * @return property id */ - public Object getColumnProperty() { - return columnProperty; + public Object getPropertyId() { + return propertyId; } /** @@ -4387,7 +4387,7 @@ public class Grid extends AbstractComponent implements SelectionNotifier, editedItemId = itemId; for (Column column : getColumns()) { - Object propertyId = column.getColumnProperty(); + Object propertyId = column.getPropertyId(); Field editor = getEditorField(propertyId); diff --git a/uitest/src/com/vaadin/tests/components/grid/GridColumnExpand.java b/uitest/src/com/vaadin/tests/components/grid/GridColumnExpand.java index eb0c14ae41..f8338f991a 100644 --- a/uitest/src/com/vaadin/tests/components/grid/GridColumnExpand.java +++ b/uitest/src/com/vaadin/tests/components/grid/GridColumnExpand.java @@ -151,7 +151,7 @@ public class GridColumnExpand extends AbstractTestUI { double minimumWidth = Math.round(column.getMinimumWidth() * 100) / 100; double maximumWidth = Math.round(column.getMaximumWidth() * 100) / 100; double width = Math.round(column.getWidth() * 100) / 100; - Object propertyId = column.getColumnProperty(); + Object propertyId = column.getPropertyId(); label.setValue(String.format( "[%s] Expand ratio: %s - min: %s - max: %s - width: %s", propertyId, expandRatio, minimumWidth, maximumWidth, width)); -- 2.39.5