diff options
author | John Ahlroos <john@vaadin.com> | 2014-04-28 17:04:30 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2014-04-28 17:04:30 +0300 |
commit | 3cba005cdbd00b47618fce6b5aa08c19622f400e (patch) | |
tree | 8353fb8568747e1e7bd94fed0d732b540cc846ad | |
parent | ed96018198db94991b828124ff73a86a250160cb (diff) | |
download | vaadin-framework-7.4.0.alpha1.tar.gz vaadin-framework-7.4.0.alpha1.zip |
Fixed update order of column state #133347.4.0.alpha1
Change-Id: I7882027441a5ea0389189fd08c2918e33afe71b6
-rw-r--r-- | client/src/com/vaadin/client/ui/grid/GridConnector.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java index e862097009..e55a71cb2e 100644 --- a/client/src/com/vaadin/client/ui/grid/GridConnector.java +++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java @@ -204,11 +204,20 @@ public class GridConnector extends AbstractComponentConnector { private void addColumnFromStateChangeEvent(int columnIndex) { GridColumnState state = getState().columns.get(columnIndex); CustomGridColumn column = new CustomGridColumn(columnIndex); - updateColumnFromState(column, state); - columnIdToColumn.put(state.id, column); + // Adds a column to grid, and registers Grid with the column. getWidget().addColumn(column, columnIndex); + + /* + * Have to update state _after_ the column has been added to the grid as + * then, and only then, the column will call the grid which in turn will + * call the escalator's refreshRow methods on header/footer/body and + * visually refresh the row. If this is done in the reverse order the + * first column state update will be lost as no grid instance is + * present. + */ + updateColumnFromState(column, state); } /** |