JustPaste.it
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

<p:dataTable id="studies-dt" paginator="true" rows="10" paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15"
var="study" value="#{queryStudiesBean.studies}"
rowIndexVar="studyIndex">

<p:column>
<p:rowToggler />
</p:column>

<p:column headerText="Study UID">
<h:outputText value="#{study.get('0020000D').value}" />
</p:column>

<p:column headerText="Accession Number">
<h:outputText value="#{study.get('00080050').value}" />
</p:column>

<p:column headerText="Patient ID">
<h:outputText value="#{study.get('00100020').value}" />
</p:column>

<p:column headerText="Patient Name">
<h:outputText value="#{study.get('00100010').value}" />
</p:column>

<p:column headerText="Study Description">
<h:outputText value="#{study.get('00081030').value}" />
</p:column>

<p:column headerText="Referring Physician">
<h:outputText value="#{study.get('00080090').value}" />
</p:column>

<p:column headerText="Action">
<p:commandButton value="Edit" oncomplete="PF('editStudy').show()" type="button">
<p:ajax event="click" listener="#{queryStudiesBean.setRenderDialog(true)}" update="editDialogStudy" />
<p:ajax event="click" listener="#{queryStudiesBean.setEditableStudyIndex(studyIndex)}" update="editDialogStudy:edit-study-attributes" />
<p:ajax event="click" listener="#{queryStudiesBean.setEditablePatientIndex(patientIndex)}" update="editDialogStudy:edit-study-attributes" />
</p:commandButton>
</p:column>

<p:ajax event="rowToggle" listener="#{querySeriesBean.onRowToggle}" />

<p:rowExpansion>
<ui:include src="series-datatable.xhtml" />
</p:rowExpansion>
</p:dataTable>
</ui:composition>