Search in sources :

Example 1 with RpcDataProviderExtension

use of com.vaadin.server.communication.data.RpcDataProviderExtension in project cuba by cuba-platform.

the class ComponentGridDecorator method refresh.

/**
 * Refreshes the grid preserving its current cell focus.
 *
 * @return the decorator for method chaining
 */
public ComponentGridDecorator<T> refresh() {
    focusPreserveExtension.saveFocus();
    // https://github.com/viritin/viritin/blob/viritin-1.44/src/main/java/org/vaadin/viritin/grid/MGrid.java#L218
    for (Extension extension : grid.getExtensions()) {
        if (extension instanceof RpcDataProviderExtension) {
            ((RpcDataProviderExtension) extension).refreshCache();
            break;
        }
    }
    focusPreserveExtension.restoreFocus();
    return this;
}
Also used : DetailsKeysExtension(com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.DetailsKeysExtension) Extension(com.vaadin.server.Extension) ComponentCellKeyExtension(com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.ComponentCellKeyExtension) FocusPreserveExtension(com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.FocusPreserveExtension) RpcDataProviderExtension(com.vaadin.server.communication.data.RpcDataProviderExtension) RpcDataProviderExtension(com.vaadin.server.communication.data.RpcDataProviderExtension)

Aggregations

ComponentCellKeyExtension (com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.ComponentCellKeyExtension)1 DetailsKeysExtension (com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.DetailsKeysExtension)1 FocusPreserveExtension (com.haulmont.cuba.web.toolkit.ui.renderers.componentrenderer.FocusPreserveExtension)1 Extension (com.vaadin.server.Extension)1 RpcDataProviderExtension (com.vaadin.server.communication.data.RpcDataProviderExtension)1