Package com.vaadin.client.widget.grid
Interface EditorHandler.EditorRequest<T>
-
- Type Parameters:
T- the row data type
- Enclosing interface:
- EditorHandler<T>
public static interface EditorHandler.EditorRequest<T>A request class passed as a parameter to the editor handler methods. The request is callback-based to facilitate usage with remote or otherwise asynchronous data sources.An implementation must call either
success()or#fail(), according to whether the operation was a success or failed during execution, respectively.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidfailure()Informs Grid that an error occurred while trying to process the request.default voidfailure(String errorMessage, Collection<Grid.Column<?,T>> errorColumns)Informs Grid that an error occurred while trying to process the request.intgetColumnIndex()Returns the DOM index of the column being focused.Grid<T>getGrid()Returns the grid instance related to this editor request.TgetRow()Returns the row data related to the row being requested.intgetRowIndex()Returns the index of the row being requested.com.google.gwt.user.client.ui.WidgetgetWidget(Grid.Column<?,T> column)Returns the editor widget used to edit the values of the given column.booleanisCompleted()Checks whether the request is completed or not.voidsuccess()Informs Grid that the editor request was a success.
-
-
-
Method Detail
-
getRowIndex
int getRowIndex()
Returns the index of the row being requested.- Returns:
- the row index
-
getColumnIndex
int getColumnIndex()
Returns the DOM index of the column being focused.- Returns:
- the column index (excluding hidden columns)
-
getRow
T getRow()
Returns the row data related to the row being requested.- Returns:
- the row data
-
getGrid
Grid<T> getGrid()
Returns the grid instance related to this editor request.- Returns:
- the grid instance
-
getWidget
com.google.gwt.user.client.ui.Widget getWidget(Grid.Column<?,T> column)
Returns the editor 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
-
success
void success()
Informs Grid that the editor request was a success.
-
failure
void failure()
Informs Grid that an error occurred while trying to process the request.
-
failure
default void failure(String errorMessage, Collection<Grid.Column<?,T>> errorColumns)
Informs Grid that an error occurred while trying to process the request. This method is a short-hand for callingfailure()andGrid.Editor.setEditorError(String, Collection)- Parameters:
errorMessage- and error message to show to the user, ornullto not show any message.errorColumns- a collection of columns for which an error indicator should be shown, ornullif no columns should be marked as erroneous.- See Also:
Grid.Editor.setEditorError(String, Collection)
-
isCompleted
boolean isCompleted()
Checks whether the request is completed or not.- Returns:
trueif the request is completed
-
-