diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2015-08-28 13:36:01 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2015-10-28 08:42:09 +0200 |
commit | fb28652b033bc500c114c65d84f418b6249befa4 (patch) | |
tree | 7080fc7abd60654a7776a69245b94136f086fbd7 /server/src/com | |
parent | 1ee652d48c5e9a5fb5ea4e550492935689ce53f9 (diff) | |
download | vaadin-framework-fb28652b033bc500c114c65d84f418b6249befa4.tar.gz vaadin-framework-fb28652b033bc500c114c65d84f418b6249befa4.zip |
Support caption fetching for HTML and Widget headers. (#18528)
Change-Id: Idad2cbbb6b138258ff6428e7ecc3d922ef99c675
Diffstat (limited to 'server/src/com')
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index e80f703c16..5dfb8e83ed 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -3224,19 +3224,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Returns the caption of the header. By default the header caption is * the property id of the column. * - * @return the text in the default row of header, null if no default row + * @return the text in the default row of header. * * @throws IllegalStateException * if the column no longer is attached to the grid */ public String getHeaderCaption() throws IllegalStateException { checkColumnIsAttached(); - HeaderRow row = grid.getHeader().getDefaultRow(); - if (row != null) { - return row.getCell(grid.getPropertyIdByColumnId(state.id)) - .getText(); - } - return null; + + return state.headerCaption; } /** |