com.vaadin.client.ui.grid
Interface EditorRowHandler<T>

Type Parameters:
T - the row data type

public interface EditorRowHandler<T>

An interface for binding widgets and data to the editor row. Used by the editor row to support different row types, data sources and custom data binding mechanisms.

Since:
Author:
Vaadin Ltd

Nested Class Summary
static class EditorRowHandler.EditorRowRequest<T>
          A request class for handling asynchronous data binding.
 
Method Summary
 void bind(EditorRowHandler.EditorRowRequest<T> request)
          Binds row data to the editor row widgets.
 void cancel(EditorRowHandler.EditorRowRequest<T> request)
          Cancels a currently active edit if any.
 void commit(EditorRowHandler.EditorRowRequest<T> request)
          Commits changes in the currently active edit to the data source.
 void discard(EditorRowHandler.EditorRowRequest<T> request)
          Discards any unsaved changes and reloads editor content from the data source.
 Widget getWidget(GridColumn<?,T> column)
          Returns a widget instance that is used to edit the values in the given column.
 

Method Detail

bind

void bind(EditorRowHandler.EditorRowRequest<T> request)
Binds row data to the editor row widgets. Called by the editor row when it is opened for editing.

An implementation must call request.invokeCallback() when the binding is complete (possibly asynchronously).

Parameters:
request - the data binding request
See Also:
EditorRow.editRow(int)

cancel

void cancel(EditorRowHandler.EditorRowRequest<T> request)
Cancels a currently active edit if any. Called by the editor row when editing is cancelled.

An implementation must call request.invokeCallback() when the cancel is done (possibly asynchronously).

Parameters:
request - the cancel request
See Also:
EditorRow.cancel()

commit

void commit(EditorRowHandler.EditorRowRequest<T> request)
Commits changes in the currently active edit to the data source. Called by the editor row when changes are saved.

Parameters:
request - the commit request

discard

void discard(EditorRowHandler.EditorRowRequest<T> request)
Discards any unsaved changes and reloads editor content from the data source.

Implementation note: This method may simply call bind if no other processing needs to be done.

Parameters:
request - the discard request

getWidget

Widget getWidget(GridColumn<?,T> column)
Returns a widget instance that is used to edit the values in the given column. A null return value means the column is not editable.

Parameters:
column - the column whose values should be edited
Returns:
the editor widget for the column or null if the column is not editable


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