DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
a61e1b5b1975BMWGreen
282108731979FordWhite
571e2dd32002MercedesGreen
cbe53fc81981VolvoWhite
efcafd241996VolkswagenYellow
a038ebe42001AudiGreen
e78ffa2a1999HondaMaroon
73ee0db91984FiatWhite
d2b5ac3c1968JaguarRed
b80062c61985VolvoOrange
Draggable Rows
IdYearBrandColor
6c2375ab1982AudiYellow
1a3d801c1975AudiGreen
724601f91996VolkswagenMaroon
4c7b19491984FordMaroon
34b88c8e1980RenaultBrown
f63ab82b1988RenaultSilver
1a162b051977HondaSilver
e452fd921973JaguarBrown
74752fb92005FordYellow
113379991964RenaultGreen
<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.RC1 on Mojarra-2.3.2.