com.vaadin.data
Class RpcDataProviderExtension

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.server.AbstractExtension
          extended by com.vaadin.data.RpcDataProviderExtension
All Implemented Interfaces:
MethodEventSource, ClientConnector, Extension, com.vaadin.shared.Connector, java.io.Serializable

public class RpcDataProviderExtension
extends AbstractExtension

Provides Vaadin server-side container data source to a com.vaadin.client.ui.grid.GridConnector. This is currently implemented as an Extension hardcoded to support a specific connector type. This will be changed once framework support for something more flexible has been implemented.

Since:
7.2
Author:
Vaadin Ltd
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
 
Constructor Summary
RpcDataProviderExtension(Container.Indexed container)
          Creates a new data provider using the given container.
 
Method Summary
 void extend(Grid component)
          Makes the data source available to the given Grid component.
protected  com.vaadin.shared.data.DataProviderState getState()
          Returns the shared state for this connector.
 void insertRowData(int index, int count)
          Informs the client side that new rows have been inserted into the data source.
 void removeRowData(int firstIndex, int count)
          Informs the client side that rows have been removed from the data source.
 void updateRowData(int index)
          Informs the client side that data of a row has been modified in the data source.
 
Methods inherited from class com.vaadin.server.AbstractExtension
extend, getParent, getSupportedParentType, remove, setParent
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 

Constructor Detail

RpcDataProviderExtension

public RpcDataProviderExtension(Container.Indexed container)
Creates a new data provider using the given container.

Parameters:
container - the container to make available
Method Detail

getState

protected com.vaadin.shared.data.DataProviderState getState()
Description copied from class: AbstractClientConnector
Returns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.

As a side effect, marks the connector dirty so any changes done to the state will be sent to the client. Use getState(false) to avoid marking the connector as dirty.

Overrides:
getState in class AbstractClientConnector
Returns:
The shared state for this connector. Never null.

extend

public void extend(Grid component)
Makes the data source available to the given Grid component.

Parameters:
component - the remote data grid component to extend

insertRowData

public void insertRowData(int index,
                          int count)
Informs the client side that new rows have been inserted into the data source.

Parameters:
index - the index at which new rows have been inserted
count - the number of rows inserted at index

removeRowData

public void removeRowData(int firstIndex,
                          int count)
Informs the client side that rows have been removed from the data source.

Parameters:
firstIndex - the index of the first row removed
count - the number of rows removed

updateRowData

public void updateRowData(int index)
Informs the client side that data of a row has been modified in the data source.

Parameters:
index - the index of the row that was updated


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