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 ...

Get PrimeFaces Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.