TreeTable - Selection Tree provides three selection modes, "single", "multiple" and "checkbox" in addition to the regular column based selection.
Single
NameSizeType
Multiple with metakey
NameSizeType
Checkbox
NameSizeType
<h:form>
    <p:growl id="msgs" showDetail="true" escape="false"/>

    <p:treeTable value="#{ttSelectionView.root1}" var="document" selectionMode="single" selection="#{ttSelectionView.selectedNode}" style="margin-top:0">
        <f:facet name="header">
            Single
        </f:facet>
        <p:column headerText="Name">
            <h:outputText value="#{document.name}" />
        </p:column>
        <p:column headerText="Size">
            <h:outputText value="#{document.size}" />
        </p:column>
        <p:column headerText="Type">
            <h:outputText value="#{document.type}" />
        </p:column>
    </p:treeTable>

    <p:commandButton value="Display" update="msgs" icon="ui-icon-newwin"
                        actionListener="#{ttSelectionView.displaySelectedSingle}"/>

    <p:treeTable value="#{ttSelectionView.root2}" var="document" selectionMode="multiple" selection="#{ttSelectionView.selectedNodes1}">
        <f:facet name="header">
            Multiple with metakey
        </f:facet>
        <p:column headerText="Name">
            <h:outputText value="#{document.name}" />
        </p:column>
        <p:column headerText="Size">
            <h:outputText value="#{document.size}" />
        </p:column>
        <p:column headerText="Type">
            <h:outputText value="#{document.type}" />
        </p:column>
    </p:treeTable>

    <p:commandButton value="Display" update="msgs" icon="ui-icon-newwin"
                     actionListener="#{ttSelectionView.displaySelectedMultiple(ttSelectionView.selectedNodes1)}"/>

    <p:treeTable value="#{ttSelectionView.root3}" var="document" selectionMode="checkbox" selection="#{ttSelectionView.selectedNodes2}">
        <f:facet name="header">
            Checkbox
        </f:facet>
        <p:column headerText="Name">
            <h:outputText value="#{document.name}" />
        </p:column>
        <p:column headerText="Size">
            <h:outputText value="#{document.size}" />
        </p:column>
        <p:column headerText="Type">
            <h:outputText value="#{document.type}" />
        </p:column>
    </p:treeTable>

    <p:commandButton value="Display" update="msgs" icon="ui-icon-newwin"
                        actionListener="#{ttSelectionView.displaySelectedMultiple(ttSelectionView.selectedNodes2)}"/>
</h:form>
                
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.