public interface DataProviderRpc extends ClientRpc
Modifier and Type | Method and 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.
|
@NoLayout void setRowData(int firstRowIndex, JsonArray rowDataJson)
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.
firstRowIndex
- the index of the first updated rowrowDataJson
- the updated row dataGridState.JSONKEY_DATA
,
com.vaadin.ui.Renderer#encode(Object)
@NoLayout void removeRowData(int firstRowIndex, int count)
firstRowIndex
- the index of the first removed rowcount
- the number of rows removed from firstRowIndex
and
onwards@NoLayout void insertRowData(int firstRowIndex, int count)
firstRowIndex
- the index of the first new rowcount
- the number of rows inserted at firstRowIndex
void resetDataAndSize(int size)
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
size
- the size of the new data setCopyright © 2018 Vaadin Ltd. All rights reserved.