com.vaadin.client.widget.grid.
Interface EditorHandler<T>
-
Type Parameters:
T
- the row data typepublic interface EditorHandler<T>
An interface for binding widgets and data to the grid row editor. Used by the editor to support different row types, data sources and custom data binding mechanisms.
Since:
7.4
Author:
Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EditorHandler.EditorRequest<T>
A request class passed as a parameter to the editor handler methods.
-
Method Summary
All Methods Modifier and Type Method Description void
bind(EditorHandler.EditorRequest<T> request)
Binds row data to the editor widgets.
void
cancel(EditorHandler.EditorRequest<T> request)
Called by the editor when editing is cancelled.
com.google.gwt.user.client.ui.Widget
getWidget(Grid.Column<?,T> column)
Returns a widget instance that is used to edit the values in the given column.
void
save(EditorHandler.EditorRequest<T> request)
Commits changes in the currently active edit to the data source.
-
-
-
Method Detail
-
bind
void bind(EditorHandler.EditorRequest<T> request)
Binds row data to the editor widgets. Called by the editor when it is opened for editing.
The implementation must call either
EditorHandler.EditorRequest.success()
orEditorHandler.EditorRequest.failure(String, Collection)
to signal a successful or a failed (respectively) bind action.Parameters:
request
- the data binding requestSee Also:
-
cancel
void cancel(EditorHandler.EditorRequest<T> request)
Called by the editor when editing is cancelled. This method may have an empty implementation in case no special processing is required.
In contrast to
bind(EditorRequest)
andsave(EditorRequest)
, any calls toEditorHandler.EditorRequest.success()
orEditorHandler.EditorRequest.failure(String, Collection)
have no effect on the outcome of the cancel action. The editor is already closed when this method is called.Parameters:
request
- the cancel requestSee Also:
-
save
void save(EditorHandler.EditorRequest<T> request)
Commits changes in the currently active edit to the data source. Called by the editor when changes are saved.
The implementation must call either
EditorHandler.EditorRequest.success()
orEditorRequest#fail()
to signal a successful or a failed (respectively) save action.Parameters:
request
- the save requestSee Also:
-
getWidget
com.google.gwt.user.client.ui.Widget getWidget(Grid.Column<?,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 editedReturns:
the editor widget for the column or null if the column is not editable
-
-