Adding drag-and-drop capabilities
One of the events that we can use in ADF Faces is drag-and-drop.
The ADF Faces framework provides the ability to drag-and-drop items from one place to another on a page. Drag-and-drop provides users with a richer user experience that can make the user's task easier and more relevant.
In this recipe, we will implement two variations of the drag-and-drop functionality and see them in action. You can refer to the last recipe, or you can grab this project's recipe by cloning the ADFFacesDragAndDrop
application from the Git repository.
How to do it…
To learn how to add drag-and-drop capabilities, we will first need to create a simple drag-and-drop attribute. Follow the ensuing steps to do this:
Open the
adfc-config.xml
file.Drag a
View
component from the Components palette and drop it inside the Diagram mode.Name the view
dragAndDrop
.Double-click on the newly created view to create the page and choose the Default Hr Template page template.
Drag a Panel Group Layout...