diff options
author | jdewaen <jdewaen@users.noreply.github.com> | 2020-12-18 21:40:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 22:40:13 +0200 |
commit | a250bde2bf0ae47368e3c8d0f339567254b40262 (patch) | |
tree | 5b24d74c1d6791d73409093498c6d2395f59d7c3 /server | |
parent | c8e04dc5b30f8967c58df928872ca2e5e2be5c5b (diff) | |
download | vaadin-framework-a250bde2bf0ae47368e3c8d0f339567254b40262.tar.gz vaadin-framework-a250bde2bf0ae47368e3c8d0f339567254b40262.zip |
Add getter for presentationProvider in Grid.Column (#10323) (#12060)
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
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Grid.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index eb90328725..5d7534ae6a 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -1262,6 +1262,18 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents, } /** + * 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 * {@link DataProvider} and the defined sort order for this column. When |