com.vaadin.shared.data
Interface DataProviderRpc

All Superinterfaces:
ClientRpc, java.io.Serializable

public interface DataProviderRpc
extends ClientRpc

RPC interface used for pushing container data to the client.

Since:
7.4
Author:
Vaadin Ltd

Method Summary
 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.
 

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 row
rowDataJson - 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 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


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.