com.vaadin.client.ui.grid
Class EditorRowHandler.EditorRowRequest<T>

java.lang.Object
  extended by com.vaadin.client.ui.grid.EditorRowHandler.EditorRowRequest<T>
Enclosing interface:
EditorRowHandler<T>

public static class EditorRowHandler.EditorRowRequest<T>
extends java.lang.Object

A request class for handling asynchronous data binding. The request is callback-based to facilitate usage with remote or otherwise asynchronous data sources.

TODO Should have a mechanism for signaling a failed request to the caller


Nested Class Summary
static interface EditorRowHandler.EditorRowRequest.RequestCallback<T>
          A callback interface used to notify the caller about completed requests.
 
Constructor Summary
EditorRowHandler.EditorRowRequest(Grid<T> grid, int rowIndex, EditorRowHandler.EditorRowRequest.RequestCallback<T> callback)
          Creates a new editor row request.
 
Method Summary
 Grid<T> getGrid()
          Returns the grid instance related to this editor row request.
 T getRow()
          Returns the row data related to the row being requested.
 int getRowIndex()
          Returns the index of the row being requested.
 Widget getWidget(GridColumn<?,T> column)
          Returns the editor row widget used to edit the values of the given column.
 void invokeCallback()
          Invokes the stored callback if it is not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorRowHandler.EditorRowRequest

public EditorRowHandler.EditorRowRequest(Grid<T> grid,
                                         int rowIndex,
                                         EditorRowHandler.EditorRowRequest.RequestCallback<T> callback)
Creates a new editor row request.

Parameters:
rowIndex - the index of the edited row
callback - the callback invoked when the request is ready, or null if no need to call back
Method Detail

getRowIndex

public int getRowIndex()
Returns the index of the row being requested.

Returns:
the row index

getRow

public T getRow()
Returns the row data related to the row being requested.

Returns:
the row data

getGrid

public Grid<T> getGrid()
Returns the grid instance related to this editor row request.

Returns:
the grid instance

getWidget

public Widget getWidget(GridColumn<?,T> column)
Returns the editor row widget used to edit the values of the given column.

Parameters:
column - the column whose widget to get
Returns:
the widget related to the column

invokeCallback

public void invokeCallback()
Invokes the stored callback if it is not null.



Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.