diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/renderers/Renderer.java | 8 | ||||
-rw-r--r-- | client/src/com/vaadin/client/renderers/WidgetRenderer.java | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/renderers/Renderer.java b/client/src/com/vaadin/client/renderers/Renderer.java index a3faa1e9df..b2e9acd582 100644 --- a/client/src/com/vaadin/client/renderers/Renderer.java +++ b/client/src/com/vaadin/client/renderers/Renderer.java @@ -35,7 +35,13 @@ import com.vaadin.client.widgets.Grid; public interface Renderer<T> { /** - * Called whenever the {@link Grid} updates a cell + * Called whenever the {@link Grid} updates a cell. + * <p> + * For optimal performance, work done in this method should be kept to a + * minimum since it will be called continuously while the user is scrolling. + * It is recommended to set up the cell's DOM structure in + * {@link ComplexRenderer#init(RendererCellReference)} and only make + * incremental updates based on cell data in this method. * * @param cell * The cell. Note that the cell is a flyweight and should not be diff --git a/client/src/com/vaadin/client/renderers/WidgetRenderer.java b/client/src/com/vaadin/client/renderers/WidgetRenderer.java index 1a33894e8e..d7219e7241 100644 --- a/client/src/com/vaadin/client/renderers/WidgetRenderer.java +++ b/client/src/com/vaadin/client/renderers/WidgetRenderer.java @@ -60,6 +60,11 @@ public abstract class WidgetRenderer<T, W extends Widget> extends * information in the widget that is cell specific. Do not detach the Widget * here, it will be done automatically by the Grid when the widget is no * longer needed. + * <p> + * For optimal performance, work done in this method should be kept to a + * minimum since it will be called continuously while the user is scrolling. + * The renderer can use {@link Widget#setLayoutData(Object)} to store cell + * data that might be needed in e.g. event listeners. * * @param cell * The cell to render. Note that the cell is a flyweight and |