O'Reilly logo

PrimeFaces Cookbook by Mert Çalışkan, Oleg Varaksin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AJAX-enhanced drag-and-drop

The user's client-side drag-and-drop interactions can be posted to the server. Drag-and-drop has only one (default) AJAX behavior event provided by the droppable component, which is processed when a valid draggable component is dropped. That is the drop event. If we define a listener, it will be invoked by passing an event instance of the type org.primefaces.event.DragDrop as parameter. This parameter holds information about the dragged-and-dropped components. By means of this information, the server-side state of the draggable/droppable items can be updated.

In this recipe, we will develop a workflow simulating a process of pizza ordering. The pizza ordering should occur by drag-and-drop. Users should be able to select ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required