T - the presentation type of the rendererpublic abstract class AbstractRendererConnector<T> extends AbstractExtensionConnector
Renderer to a server-side
Renderer. As a connector, it
can use the regular Vaadin RPC and shared state mechanism to pass additional
state and information between the client and the server. This base class
itself only uses the basic SharedState and no RPC interfaces.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRendererConnector() |
| Modifier and Type | Method and Description |
|---|---|
protected Renderer<T> |
createRenderer()
Creates a new Renderer instance associated with this renderer connector.
|
T |
decode(elemental.json.JsonValue value)
Decodes the given JSON value into a value of type T so it can be passed
to the
renderer. |
protected void |
extend(ServerConnector target)
Deprecated.
|
protected String |
getColumnId(Grid.Column<?,elemental.json.JsonObject> column)
Gets the column id for a column.
|
Renderer<T> |
getRenderer()
Returns the renderer associated with this renderer connector.
|
protected String |
getRowKey(elemental.json.JsonObject row)
Gets the row key for a row object.
|
setParentaddStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getState, getStateType, hasEventListener, init, isEnabled, onStateChanged, onUnregister, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, unregisterRpc, updateEnabledStatepublic Renderer<T> getRenderer()
A subclass of AbstractRendererConnector should override this method as
shown below. The framework uses
GWT.create(Class) to
create a renderer based on the return type of the overridden method, but
only if createRenderer() is not overridden as well:
public MyRenderer getRenderer() {
return (MyRenderer) super.getRenderer();
}
protected Renderer<T> createRenderer()
You should typically not override this method since the framework by
default generates an implementation that uses
GWT.create(Class) to create a renderer
of the same type as returned by the most specific override of
getRenderer(). If you do override the method, you can't call
super.createRenderer() since the metadata needed for that
implementation is not generated if there's an override of the method.
public T decode(elemental.json.JsonValue value)
renderer.value - the value to decodevalue@Deprecated protected void extend(ServerConnector target)
AbstractExtensionConnectorextend in class AbstractExtensionConnectortarget - The connector this extension extendsprotected String getRowKey(elemental.json.JsonObject row)
In case this renderer wants be able to identify a row in such a way that the server also understands it, the row key is used for that. Rows are identified by unified keys between the client and the server.
row - the row objectprotected String getColumnId(Grid.Column<?,elemental.json.JsonObject> column)
In case this renderer wants be able to identify a column in such a way that the server also understands it, the column id is used for that. Columns are identified by unified ids between the client and the server.
column - the column objectCopyright © 2016 Vaadin Ltd. All rights reserved.