Package 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 Instance Methods Abstract 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, JsonArray rowDataJson)
Sends updated row data to a client.void
updateRowData(JsonArray rowArray)
Informs the client that rows have been updated.
-
-
-
Method Detail
-
setRowData
@NoLayout void setRowData(int firstRowIndex, 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 rowrowDataJson
- the updated row data- See Also:
GridState.JSONKEY_DATA
,com.vaadin.ui.components.grid.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 rowcount
- the number of rows removed fromfirstRowIndex
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 rowcount
- the number of rows inserted atfirstRowIndex
-
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
-
-