com.vaadin.shared.data.

Interface DataProviderRpc

  • All Superinterfaces:

    ClientRpc, Serializable

    public interface DataProviderRpc
    extends ClientRpc

    RPC interface used for pushing container data to the client.

    Since:

    7.4

    Author:

    Vaadin Ltd

    • Method Summary

      All Methods
      Modifier and Type Method Description
      void insertRowData​(int firstRowIndex, int count)

      Informs the client to insert new row data.

      void removeRowData​(int firstRowIndex, int count)

      Informs the client to remove row data.

      void resetDataAndSize​(int size)

      Resets all data and defines a new size for the data.

      void setRowData​(int firstRowIndex, elemental.json.JsonArray rowDataJson)

      Sends updated row data to a client.

      void updateRowData​(elemental.json.JsonArray rowArray)

      Informs the client that rows have been updated.

    • Method Detail

      • setRowData

        @NoLayout
        void setRowData​(int firstRowIndex,
                        elemental.json.JsonArray rowDataJson)

        Sends updated row data to a client.

        rowDataJson represents a JSON array of JSON objects in the following format:

         [{
           "d": [COL_1_JSON, COL_2_json, ...],
           "k": "1"
         },
         ...
         ]
         
        where COL_INDEX is the index of the column (as a string), and COL_n_JSON is valid JSON of the column's data.

        Parameters:

        firstRowIndex - the index of the first updated row

        rowDataJson - the updated row data

        See Also:

        GridState.JSONKEY_DATA, com.vaadin.ui.Renderer#encode(Object)

      • removeRowData

        @NoLayout
        void removeRowData​(int firstRowIndex,
                           int count)

        Informs the client to remove row data.

        Parameters:

        firstRowIndex - the index of the first removed row

        count - the number of rows removed from firstRowIndex and onwards

      • insertRowData

        @NoLayout
        void insertRowData​(int firstRowIndex,
                           int count)

        Informs the client to insert new row data.

        Parameters:

        firstRowIndex - the index of the first new row

        count - the number of rows inserted at firstRowIndex

      • resetDataAndSize

        void resetDataAndSize​(int size)

        Resets all data and defines a new size for the data.

        This should be used in the cases where the data has changed in some unverifiable way. I.e. "something happened". This will lead to a re-rendering of the current Grid viewport

        Parameters:

        size - the size of the new data set

      • updateRowData

        @NoLayout
        void updateRowData​(elemental.json.JsonArray rowArray)

        Informs the client that rows have been updated. The client-side DataSource will map the given data to correct index if it should be in the cache.

        Parameters:

        rowArray - array of updated rows

        Since:

        7.6