Dear Vaadin experts,
while migrating to Framework 8.1 I realized there seem to be no examples for using the drop criteria. On https://vaadin.com/docs/v8/framework/advanced/advanced-dragndrop.html they are only mentioned globally and on https://demo.vaadin.com/sampler/#ui/drag-drop/drag-components-html5 there is no drop criteria used.
In Vaadin 7 there was the method
AcceptCriterion getAcceptCriterion()
of the interface
DropListener
where the logic could be implemented. The application used
ServerSideCriterion
to check if the dragged component could be dropped.
But now in Vaadin 8.1 it seems that I can only either use JavaScript (which I can’t because I have to check some things only known on the server side) or set some payloads on the
DragSourceExtension
. I tried using payloads, but then my components are not draggable anymore!
I have multiple draggable sources and multiple potential drop targets in the application. It would be fine for me to set some organizational tags (as payloads) on the DragSourceExtension so I can check only the payloads, but the component must stay draggable.
Is there any example on how to do this?