|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.data.RpcDataProviderExtension
public class RpcDataProviderExtension
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.
| Nested Class Summary | |
|---|---|
class |
RpcDataProviderExtension.DataProviderKeyMapper
ItemId to Key to ItemId mapper. |
| 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 |
beforeClientResponse(boolean initial)
Called before the shared state and RPC invocations are sent to the client. |
|
void |
columnsAdded(java.util.List<Grid.Column> addedColumns)
Informs this data provider that given columns have been added to grid. |
|
void |
columnsRemoved(java.util.List<Grid.Column> removedColumns)
Informs this data provider that given columns have been removed from grid. |
|
static
|
encodeValue(java.lang.Object modelValue,
Renderer<T> renderer,
Converter<?,?> converter,
java.util.Locale locale)
Converts and encodes the given data model property value using the given converter and renderer. |
|
void |
extend(Grid component,
KeyMapper<java.lang.Object> columnKeys)
Makes the data source available to the given Grid component. |
|
protected Grid |
getGrid()
|
|
RpcDataProviderExtension.DataProviderKeyMapper |
getKeyMapper()
|
|
void |
refreshCache()
Pushes a new version of all the rows in the active cache range. |
|
void |
setParent(ClientConnector parent)
Sets the parent connector of the connector. |
|
void |
updateRowData(java.lang.Object itemId)
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
addAttachListener, addDetachListener, attach, 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 |
|---|
public RpcDataProviderExtension(Container.Indexed container)
container - the container to make available| Method Detail |
|---|
public void beforeClientResponse(boolean initial)
This method must not alter the component hierarchy in any way. Calling
ClientConnector.markAsDirty() from this method will have no effect.
RpcDataProviderExtension makes all actual RPC calls from this function based on changes in the container.
beforeClientResponse in interface ClientConnectorbeforeClientResponse in class AbstractClientConnectorinitial - true if the client-side connector will be created
and initialized after this method has been invoked.
false if there is already an initialized
client-side connector.
public void extend(Grid component,
KeyMapper<java.lang.Object> columnKeys)
Grid component.
component - the remote data grid component to extendpublic void updateRowData(java.lang.Object itemId)
itemId - the item Id the row that was updatedpublic void refreshCache()
public void setParent(ClientConnector parent)
ExtensionClientConnector.attach() if the connector
becomes attached to the session.
This method is rarely called directly.
AbstractClientConnector.addExtension(Extension) is normally used
for adding extensions to a parent and it will call this method
implicitly.
setParent in interface ExtensionsetParent in class AbstractExtensionparent - the parent connectorpublic void columnsRemoved(java.util.List<Grid.Column> removedColumns)
removedColumns - a list of removed columnspublic void columnsAdded(java.util.List<Grid.Column> addedColumns)
addedColumns - a list of added columnspublic RpcDataProviderExtension.DataProviderKeyMapper getKeyMapper()
protected Grid getGrid()
public static <T> elemental.json.JsonValue encodeValue(java.lang.Object modelValue,
Renderer<T> renderer,
Converter<?,?> converter,
java.util.Locale locale)
renderer - the renderer to useconverter - the converter to usemodelValue - the value to convert and encodelocale - the locale to use in conversion
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||