public static final class Grid.DetailComponentManager extends Grid.AbstractGridExtension implements DataGenerator
Grid.DetailsGenerator
as needed. Details components are attached by
this class when the RpcDataProviderExtension
is sending data to
the client. Details components are detached and forgotten when client
informs that it has dropped the corresponding item.ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Constructor and Description |
---|
DetailComponentManager(Grid grid) |
DetailComponentManager(Grid grid,
Grid.DetailsGenerator detailsGenerator) |
Modifier and Type | Method and Description |
---|---|
void |
destroyData(Object itemId)
Informs the DataGenerator that an item id has been dropped and is no
longer needed.
|
void |
generateData(Object itemId,
Item item,
JsonObject rowData)
Adds data to row object for given item and item id being sent to client.
|
Grid.DetailsGenerator |
getDetailsGenerator()
Gets the current details generator for row details.
|
boolean |
isDetailsVisible(Object itemId)
Checks whether details are visible for the given item.
|
void |
refreshDetails()
Recreates all visible details components.
|
void |
setDetailsGenerator(Grid.DetailsGenerator detailsGenerator)
Sets a new details generator for row details.
|
void |
setDetailsVisible(Object itemId,
boolean visible)
Sets details visiblity status of given item id.
|
addComponentToGrid, extend, getColumn, getItemId, getParentGrid, refreshRow, remove, removeComponentFromGrid
getParent, getSupportedParentType, setParent
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getState, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
public DetailComponentManager(Grid grid)
public DetailComponentManager(Grid grid, Grid.DetailsGenerator detailsGenerator)
public void refreshDetails()
public void setDetailsVisible(Object itemId, boolean visible)
itemId
- item id to setvisible
- true
if visible; false
if notpublic void generateData(Object itemId, Item item, JsonObject rowData)
DataGenerator
generateData
in interface DataGenerator
itemId
- item id of itemitem
- item being sent to clientrowData
- row object being sent to clientpublic void destroyData(Object itemId)
DataGenerator
destroyData
in interface DataGenerator
itemId
- removed item idpublic void setDetailsGenerator(Grid.DetailsGenerator detailsGenerator) throws IllegalArgumentException
The currently opened row details will be re-rendered.
detailsGenerator
- the details generator to setIllegalArgumentException
- if detailsGenerator is null
;public Grid.DetailsGenerator getDetailsGenerator()
public boolean isDetailsVisible(Object itemId)
itemId
- the id of the item for which to check details visibilitytrue
iff the details are visibleCopyright © 2019 Vaadin Ltd. All rights reserved.