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, paintContent
protected String getIdentifier()
getIdentifier
in class ServerSideCriterion
public boolean accept(DragAndDropEvent dragEvent)
AcceptCriterion
DropHandler.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
AcceptCriterion
AcceptCriterion.accept(DragAndDropEvent)
is called before this method.paintResponse
in interface AcceptCriterion
paintResponse
in class ServerSideCriterion
PaintException
protected abstract Set<Object> getAllowedItemIds(DragAndDropEvent dragEvent, Tree tree)
Copyright © 2019 Vaadin Ltd. All rights reserved.