public abstract static class Table.TableDropCriterion extends ServerSideCriterion
Initially pretty much no data is sent to client. On first required criterion check (per drag request) the client side data structure is initialized from server and no subsequent requests requests are needed during that drag and drop operation.
| Constructor and Description |
|---|
TableDropCriterion() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for the
DropHandler.drop(DragAndDropEvent) method. |
protected abstract Set<Object> |
getAllowedItemIds(DragAndDropEvent dragEvent,
Table table,
Collection<Object> visibleItemIds) |
protected String |
getIdentifier() |
void |
paintResponse(PaintTarget target)
This needs to be implemented iff criterion does some lazy server side
initialization.
|
isClientSideVerifiable, paint, paintContentprotected String getIdentifier()
getIdentifier in class ServerSideCriterionpublic boolean accept(DragAndDropEvent dragEvent)
AcceptCriterionDropHandler.drop(DragAndDropEvent) method.
Note that even if your criterion is validated on client side, you should always validate the data on server side too.
public void paintResponse(PaintTarget target) throws PaintException
AcceptCriterionAcceptCriterion.accept(DragAndDropEvent) is called before this method.paintResponse in interface AcceptCriterionpaintResponse in class ServerSideCriterionPaintExceptionprotected abstract Set<Object> getAllowedItemIds(DragAndDropEvent dragEvent, Table table, Collection<Object> visibleItemIds)
dragEvent - table - the table for which the allowed item identifiers are
definedvisibleItemIds - the list of currently rendered item identifiers, accepted
item id's need to be detected only for these visible itemsCopyright © 2022 Vaadin Ltd. All rights reserved.