Code: Select all
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<div class="ui-g">
<div class="ui-g-12">
<p:dataTable id="coTable" var="user" value="#{test.userList}" selection="#{test.selected}" selectionMode="single" rowKey="#{user.id}" resizableColumns="true">
<p:column headerText="code">
<h:outputText value="#{user.id}"/>
</p:column>
<p:column headerText="name">
<h:outputText value="#{user.name}"/>
</p:column>
</p:dataTable>
</div>
</div>
</ui:composition>
https://goo.gl/photos/wzQGg5vS9pFS59F66