com.vaadin.ui.
Class AbstractListing.AbstractListingExtension<T>
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- com.vaadin.ui.AbstractListing.AbstractListingExtension<T>
-
Type Parameters:
T
- the listing item typeAll Implemented Interfaces:
DataGenerator<T>
,MethodEventSource
,ClientConnector
,Extension
,Connector
,Serializable
Direct Known Subclasses:
Enclosing class:
public abstract static class AbstractListing.AbstractListingExtension<T> extends AbstractExtension implements DataGenerator<T>
A helper base class for creating extensions for Listing components. This class provides helpers for accessing the underlying parts of the component and its communication mechanism.
See Also:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
-
Constructor Summary
Constructors Constructor Description AbstractListingExtension()
-
Method Summary
All Methods Modifier and Type Method Description void
extend(AbstractListing<T> listing)
Adds this extension to the given parent listing.
protected T
getData(String key)
Gets a data object based on its client-side identifier key.
AbstractListing<T>
getParent()
Gets the parent connector of this connector, or
null
if the connector is not attached to any parent.protected AbstractListingExtensionState
getState()
Returns the shared state for this connector.
protected AbstractListingExtensionState
getState(boolean markAsDirty)
Returns the shared state for this connector.
protected void
refresh(T item)
A helper method for refreshing the client-side representation of a single data item.
void
remove()
Remove this extension from its target.
-
Methods inherited from class com.vaadin.server.AbstractExtension
extend, getSupportedParentType, setParent
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
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, 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
-
Methods inherited from interface com.vaadin.data.provider.DataGenerator
destroyAllData, destroyData, generateData, refreshData
-
-
-
-
Method Detail
-
extend
public void extend(AbstractListing<T> listing)
Adds this extension to the given parent listing.
Parameters:
listing
- the parent component to add to
-
remove
public void remove()
Description copied from interface:
Extension
Remove this extension from its target. After an extension has been removed, it cannot be attached again.
Specified by:
Overrides:
remove
in classAbstractExtension
-
getData
protected T getData(String key)
Gets a data object based on its client-side identifier key.
Parameters:
key
- key for data objectReturns:
the data object
-
getParent
public AbstractListing<T> getParent()
Description copied from interface:
Connector
Gets the parent connector of this connector, or
null
if the connector is not attached to any parent.Specified by:
getParent
in interfaceClientConnector
Specified by:
getParent
in interfaceConnector
Overrides:
getParent
in classAbstractExtension
Returns:
the parent connector, or
null
if there is no parent.
-
refresh
protected void refresh(T item)
A helper method for refreshing the client-side representation of a single data item.
Parameters:
item
- the item to refresh
-
getState
protected AbstractListingExtensionState getState()
Description copied from class:
AbstractClientConnector
Returns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.
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.Overrides:
getState
in classAbstractClientConnector
Returns:
The shared state for this connector. Never null.
-
getState
protected AbstractListingExtensionState getState(boolean markAsDirty)
Description copied from class:
AbstractClientConnector
Returns the shared state for this connector.
Overrides:
getState
in classAbstractClientConnector
Parameters:
markAsDirty
- true if the connector should automatically be marked dirty, false otherwiseReturns:
The shared state for this connector. Never null.
See Also:
-
-