]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add getter for presentationProvider in Grid.Column (#10323) (#12060)
authorjdewaen <jdewaen@users.noreply.github.com>
Fri, 18 Dec 2020 20:40:13 +0000 (21:40 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 20:40:13 +0000 (22:40 +0200)
Without access to the presentation provider used for a column, it is often not possible to reconstruct the data as shown on the end-user's screen

This commit adds a getter method to Grid.Column to allow access to this provider

server/src/main/java/com/vaadin/ui/Grid.java

index eb903287255a48e0e764f1c98193b9c2da580fb2..5d7534ae6a5f85d53113586978f2ff72dafb51d3 100644 (file)
@@ -1261,6 +1261,18 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents,
             return valueProvider;
         }
 
+        /**
+         * Gets the function to get presentations from the value of data in this
+         * column, based on the row item.
+         *
+         * @return the presentation provider function
+         *
+         * @since
+         */
+        public ValueProvider<V, ?> getPresentationProvider() {
+            return presentationProvider;
+        }
+
         /**
          * Sets whether the user can sort this column or not. Whether the column
          * is actually sortable after {@code setSortable(true)} depends on the