|
||||||||||
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 | ||
---|---|---|
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)
Makes the data source available to the given Grid component. |
|
protected Grid |
getGrid()
|
|
RpcDataProviderExtension.DataProviderKeyMapper |
getKeyMapper()
|
|
protected com.vaadin.shared.data.DataProviderState |
getState()
Returns the shared state for this connector. |
|
void |
propertiesAdded(java.util.HashSet<java.lang.Object> addedPropertyIds)
Informs this data provider that some of the properties have been added to the container. |
|
void |
propertiesRemoved(java.util.List<java.lang.Object> removedColumns)
Informs this data provider that some of the properties have been removed from the container. |
|
void |
setParent(ClientConnector parent)
Sets the parent connector of the connector. |
|
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 |
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 |
---|
public RpcDataProviderExtension(Container.Indexed container)
container
- the container to make availableMethod Detail |
---|
protected com.vaadin.shared.data.DataProviderState getState()
AbstractClientConnector
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.
getState
in class AbstractClientConnector
public void extend(Grid component)
Grid
component.
component
- the remote data grid component to extendpublic void updateRowData(int index)
index
- the index of the row that was updatedpublic void setParent(ClientConnector parent)
Extension
ClientConnector.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 Extension
setParent
in class AbstractExtension
parent
- the parent connectorpublic void propertiesRemoved(java.util.List<java.lang.Object> removedColumns)
Please note that we could add our own
PropertySetChangeListener
to the container, but then we'd need to
implement the same bookeeping for finding what's added and removed that
Grid already does in its own listener.
removedColumns
- a list of property ids for the removed columnspublic void propertiesAdded(java.util.HashSet<java.lang.Object> addedPropertyIds)
Please note that we could add our own
PropertySetChangeListener
to the container, but then we'd need to
implement the same bookeeping for finding what's added and removed that
Grid already does in its own listener.
addedPropertyIds
- a list of property ids for the added columnspublic RpcDataProviderExtension.DataProviderKeyMapper getKeyMapper()
protected Grid getGrid()
public static <T> java.lang.Object 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 |