|
||||||||||
| 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. |
static class |
RpcDataProviderExtension.DetailComponentManager
A class that makes detail component related internal communication possible between RpcDataProviderExtension and grid. |
| 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. |
|
RpcDataProviderExtension.DetailComponentManager |
getDetailComponentManager()
Gets the detail component manager for this data provider |
|
protected Grid |
getGrid()
|
|
RpcDataProviderExtension.DataProviderKeyMapper |
getKeyMapper()
|
|
boolean |
isDetailsVisible(java.lang.Object itemId)
Checks whether the details for a row is marked as visible. |
|
void |
refreshCache()
Pushes a new version of all the rows in the active cache range. |
|
void |
refreshDetails()
Refreshes all visible detail sections. |
|
void |
setDetailsVisible(java.lang.Object itemId,
boolean visible)
Marks a row's details to be visible or hidden. |
|
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 extendcolumnKeys - the key mapper for columnspublic 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
public void setDetailsVisible(java.lang.Object itemId,
boolean visible)
If that row is currently in the client side's cache, this information will be sent over to the client.
itemId - the id of the item of which to change the details visibilityvisible - true to show the details, false to
hidepublic boolean isDetailsVisible(java.lang.Object itemId)
itemId - the id of the item of which to check the visibility
true iff the detials are visible for the item. This
might return true even if the row is not currently
visible in the DOMpublic void refreshDetails()
public RpcDataProviderExtension.DetailComponentManager getDetailComponentManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||