DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
a5a3f0bc1972FordBrown
65852db31987VolvoYellow
16a68c551998VolkswagenOrange
60566a2a2002RenaultMaroon
3994d7261983VolkswagenBlue
ebe0ee321971FiatSilver
6632fc061989BMWGreen
e079c2792006BMWBlue
18d40a021960FordOrange
876e8d541992FordMaroon
Draggable Rows
IdYearBrandColor
0a1c81381972BMWBrown
c9c3b8d91984MercedesBlack
2ae7e6d11960FordOrange
902f11e81963FordYellow
6089ae621999RenaultBrown
1fc2cf941996FiatBlue
5db076571969AudiBlack
072c08981960RenaultBlack
05c82f531966VolkswagenSilver
6b1587aa1982BMWSilver
<h:form id="form">
    <p:growl id="msgs" showDetail="true" />

    <p:dataTable var="car" value="#{dtReorderView.cars1}" draggableColumns="true" style="margin-bottom:20px">
        <f:facet name="header">
            Draggable Columns
        </f:facet>
        <p:column headerText="Id">
            <h:outputText value="#{car.id}" />
        </p:column>

        <p:column headerText="Year">
            <h:outputText value="#{car.year}" />
        </p:column>

        <p:column headerText="Brand">
            <h:outputText value="#{car.brand}" />
        </p:column>

        <p:column headerText="Color">
            <h:outputText value="#{car.color}" />
        </p:column>
    </p:dataTable>

    <p:dataTable var="car" value="#{dtReorderView.cars2}" draggableRows="true">
        <p:ajax event="rowReorder" listener="#{dtReorderView.onRowReorder}" update=":form:msgs" />
        <f:facet name="header">
            Draggable Rows
        </f:facet>
        <p:column headerText="Id">
            <h:outputText value="#{car.id}" />
        </p:column>

        <p:column headerText="Year">
            <h:outputText value="#{car.year}" />
        </p:column>

        <p:column headerText="Brand">
            <h:outputText value="#{car.brand}" />
        </p:column>

        <p:column headerText="Color">
            <h:outputText value="#{car.color}" />
        </p:column>
    </p:dataTable>
</h:form>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.1-SNAPSHOT on Mojarra-2.2.8.