public abstract static class Tree.TreeDropCriterion 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 |
|---|
TreeDropCriterion() |
| 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,
Tree tree) |
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, Tree tree)
Copyright © 2016 Vaadin Ltd. All rights reserved.