Просмотр исходного кода

Use @DelegateToWidget instead of manual handling (#13334)

Change-Id: Iac7f742053b43e15e1bdf16d51cce7363987f291
tags/7.4.0.beta1
Henrik Paul 10 лет назад
Родитель
Сommit
cad8f2bf2c

+ 0
- 14
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();
}

+ 2
- 10
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. */

Загрузка…
Отмена
Сохранить