• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Primefaces dragdrop abort?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, everyone.  I am trying to figure out how to add conditions to a drag/drop event and cancel it if conditions are not right.  So far I've not been able to find anything in PrimeFaces documentation.

My markup:


inside my TreeService.java I have the following method, triggered on ajax dragdrop event:


Thank you!
 
Saloon Keeper
Posts: 22989
156
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Drag and drop is done by the user. The drag-drop JavaScript is just what gets called when they do it. So to abort a drag-drop operation, the user just releases the mouse button while not positioned over any drop area.

I think there is supposed to be an event that firest to let you know that the drop terminated, but I can't recall what that is.
 
An Ar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As always, thanks for pointing the way, Tim!
 
It's exactly the same and completely different as this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic