DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
3b7cd2631995JaguarGreen
668d4ea21996AudiMaroon
c6d184662003HondaGreen
4d9469631962MercedesBlue
10fa8e1c1968RenaultYellow
10fb88cf1978VolvoSilver
0ec9f8361960VolkswagenRed
cb3f8d471999RenaultGreen
f78dc5511993VolkswagenBlack
ca6f2c8e1978JaguarMaroon
Draggable Rows
IdYearBrandColor
7e053b611977VolvoRed
f1c3a1a81965FiatBlue
be3074f11979MercedesGreen
34db5d211976BMWGreen
d357d05b1962AudiOrange
a74f3cb21962VolkswagenBlack
d9b774a01988FordWhite
754546702008VolvoGreen
d30a4f771976JaguarMaroon
f89d5d031990AudiBlack
<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.