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 
      Modifier and Type Method Description
      void failure​(String errorMessage, Collection<Grid.Column<?,​T>> errorColumns)
      Informs Grid that an error occurred while trying to process the request.
      int getColumnIndex()
      Returns the DOM index of the column being focused.
      Grid<T> getGrid()
      Returns the grid instance related to this editor request.
      T getRow()
      Returns the row data related to the row being requested.
      int getRowIndex()
      Returns the index of the row being requested.
      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.
      boolean isCompleted()
      Checks whether the request is completed or not.
      void success()
      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​(String errorMessage,
                     Collection<Grid.Column<?,​T>> errorColumns)
        Informs Grid that an error occurred while trying to process the request.
        Parameters:
        errorMessage - and error message to show to the user, or null to not show any message.
        errorColumns - a collection of columns for which an error indicator should be shown, or null if no columns should be marked as erroneous.
      • isCompleted

        boolean isCompleted()
        Checks whether the request is completed or not.
        Returns:
        true iff the request is completed