January 2013
Intermediate to advanced
328 pages
7h 14m
English
Any component can be enhanced with draggable behavior. To enable draggable functionality on any PrimeFaces component, we always need a component called Draggable.
In this recipe, we will see how to make a component draggable and learn some basic features of Draggable. To demonstrate these features, we will make several p:panel components draggable.
A component can be made draggable by using p:draggable. The component ID must match the for attribute of the p:draggable component. If the for attribute is omitted, the parent component will be selected as a draggable target. Let's make some panel components draggable and apply some basic features:
<p:panel id="pnl" header="Draggable panel with default settings"> ...
Read now
Unlock full access