Any idea on how to drag and drop an object in a empty location. I am using Tree as Drop location. For example, what if I want to drop an object in an Empty Tree or target == null.
Could you clarify your question? Do you want to drop entity to the Tree which doesn’t contain data? DragAndDropEvent event is always invoked if any data was dragged and dropped on it. So, you can handle this case in drop method.
vTree.setDropHandler(new DropHandler() {
@Override
public void drop(DragAndDropEvent dropEvent) {
// do logic
}
@Override
public AcceptCriterion getAcceptCriterion() {
// do logic
}
});