You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VServerAccept.java 733B

12345678910111213141516171819202122232425
  1. /**
  2. *
  3. */
  4. package com.vaadin.terminal.gwt.client.ui.dd;
  5. import com.vaadin.terminal.gwt.client.UIDL;
  6. final public class VServerAccept implements VAcceptCriterion {
  7. public void accept(final VDragEvent drag, UIDL configuration,
  8. final VAcceptCallback callback) {
  9. VDragEventServerCallback acceptCallback = new VDragEventServerCallback() {
  10. public void handleResponse(boolean accepted, UIDL response) {
  11. if (accepted) {
  12. callback.accepted(drag);
  13. }
  14. }
  15. };
  16. VDragAndDropManager.get().visitServer(acceptCallback);
  17. }
  18. public boolean needsServerSideCheck(VDragEvent drag, UIDL criterioUIDL) {
  19. return true;
  20. }
  21. }