From cad8f2bf2c02fbe2a6f406d51103909d78033c9d Mon Sep 17 00:00:00 2001 From: Henrik Paul Date: Fri, 27 Jun 2014 15:32:46 +0300 Subject: [PATCH] Use @DelegateToWidget instead of manual handling (#13334) Change-Id: Iac7f742053b43e15e1bdf16d51cce7363987f291 --- .../com/vaadin/client/ui/grid/GridConnector.java | 14 -------------- .../src/com/vaadin/shared/ui/grid/GridState.java | 12 ++---------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java index 3b1ecb44d8..31e52b1c1c 100644 --- a/client/src/com/vaadin/client/ui/grid/GridConnector.java +++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java @@ -278,20 +278,6 @@ public class GridConnector extends AbstractComponentConnector { } } - /* - * @DelegateToWidget annotation doesn't work because of - * http://dev.vaadin.com/ticket/12900. Remove manual code and uncomment - * annotations at GridState once fixed. - */ - - if (stateChangeEvent.hasPropertyChanged("heightByRows")) { - getWidget().setHeightByRows(getState().heightByRows); - } - - if (stateChangeEvent.hasPropertyChanged("heightMode")) { - getWidget().setHeightMode(getState().heightMode); - } - if (stateChangeEvent.hasPropertyChanged("selectedKeys")) { selectionModel.updateFromState(); } diff --git a/shared/src/com/vaadin/shared/ui/grid/GridState.java b/shared/src/com/vaadin/shared/ui/grid/GridState.java index 0b23e2c11d..d223d64e7e 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridState.java @@ -85,19 +85,11 @@ public class GridState extends AbstractComponentState { public String lastFrozenColumnId = null; /** The height of the Grid in terms of body rows. */ - // @DelegateToWidget - /* - * Annotation doesn't work because of http://dev.vaadin.com/ticket/12900. - * Remove manual code from Connector once fixed - */ + @DelegateToWidget public double heightByRows = DEFAULT_HEIGHT_BY_ROWS; /** The mode by which Grid defines its height. */ - // @DelegateToWidget - /* - * Annotation doesn't work because of http://dev.vaadin.com/ticket/12900. - * Remove manual code from Connector once fixed - */ + @DelegateToWidget public HeightMode heightMode = HeightMode.CSS; /** FIXME remove once selection mode communcation is done. only for testing. */ -- 2.39.5