DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
8bf2c8a31978RenaultOrange
0b0e5f941976HondaBlack
3b14d9231967MercedesSilver
b053aa601963VolkswagenBrown
d96e821f1979VolvoOrange
d8501d861960MercedesSilver
d32c68842001VolvoOrange
b3782ef21976HondaOrange
8d92e96a1976RenaultBlack
63daf8521964AudiYellow
Draggable Rows
IdYearBrandColor
58757ef01993VolkswagenGreen
2a051e401999JaguarRed
44d25fe21984RenaultGreen
061214ff1991FordBlue
be91156d1978FiatGreen
09f47eff1969AudiBlack
47c6b94e2009BMWRed
0fd8e3111972FordBrown
35f2f87b1989VolkswagenRed
87bcb0eb1989VolvoGreen
<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.