DataTable - Reorder Both columns and rows can be reordered using dragdrop.
Draggable Columns
IdYearBrandColor
b05dc79a1991MercedesGreen
e71d171a1998HondaWhite
249e7ec11960BMWBrown
f17217fd1995RenaultRed
0a25b9d61976RenaultRed
d4091b372001VolvoBlue
d9f123532008VolkswagenRed
705585dc1968AudiRed
ebb1f55c2009JaguarRed
63354e8b2003AudiBrown
Draggable Rows
IdYearBrandColor
efc648611961FiatBlack
2d4149881963JaguarRed
a1501fcd1971MercedesBrown
625a9a141977VolvoMaroon
d0a534af1982AudiBlue
6185bd501998BMWBrown
6de264832000AudiRed
d14651892002FiatRed
a486b90c1963MercedesMaroon
2d4dd6171982VolkswagenGreen
<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.