DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
64811c8c1977RenaultSilver
8aa0c5b31998MercedesOrange
e8c9f8d61961HondaSilver
12206fd81968AudiWhite
1d8ae3911975BMWYellow
5847d4931983MercedesGreen
58eac7e52004FordWhite
c3490c4f1979FiatOrange
e97141d42003VolvoMaroon
b81c0d591969MercedesBrown
Draggable Rows
IdYearBrandColor
0c57b6911990AudiRed
a83803d91999MercedesGreen
2c5655611980RenaultOrange
e35c99312005VolkswagenSilver
2d3e34fc1964RenaultBrown
f04a54252003VolvoMaroon
2cffba142001FiatGreen
d33548d91978JaguarSilver
d87e85211962JaguarBrown
e7225f4c1998RenaultWhite
<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 © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.