aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/Grid.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/Grid.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index c464acb8fc..d5d0a30bd1 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -645,8 +645,8 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
.hasKey(diffStateKey) : "Field name has changed";
Type type = null;
try {
- type = getState(false).getClass()
- .getField(diffStateKey).getGenericType();
+ type = getState(false).getClass().getField(diffStateKey)
+ .getGenericType();
} catch (NoSuchFieldException | SecurityException e) {
e.printStackTrace();
}
@@ -887,7 +887,8 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
if (hasCommonComparableBaseType(a, b)) {
return compareComparables(a, b);
} else {
- return compareComparables(Objects.toString(a, ""), Objects.toString(b, ""));
+ return compareComparables(Objects.toString(a, ""),
+ Objects.toString(b, ""));
}
}
@@ -907,7 +908,7 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
}
}
if ((a == null && b instanceof Comparable<?>)
- || (b == null && a instanceof Comparable<?>)) {
+ || (b == null && a instanceof Comparable<?>)) {
return true;
}
@@ -1076,6 +1077,16 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
}
/**
+ * Gets the function used to produce the value for data in this column
+ * based on the row item.
+ *
+ * @return the value provider function
+ */
+ public SerializableFunction<T, ? extends V> getValueProvider() {
+ return valueProvider;
+ }
+
+ /**
* Sets whether the user can sort this column or not.
*
* @param sortable