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:dialog header="Edit study" widgetVar="editStudy" id="editStudyDialogId"
modal="true" rendered="#{queryStudiesBean.renderDialog}"
width="50%" height="50%"
showEffect="explode" hideEffect="explode">

<h:form id="editDialogStudy">
<p:dataTable id="edit-study-attributes"
paginator="true" rows="5" paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15"
var="editableStudyTag" value="#{queryStudiesBean.editableStudy}">

<p:column>
<h:outputText value="#{editableStudyTag.key}" />
</p:column>

<p:column>
<h:inputText value="#{editableStudyTag.value.value}" />
</p:column>
</p:dataTable>
<div class="ui-g-12 ui-md-3 ui-lg-3">
<p:commandButton process="@form" update="@form,:form2:patient-dt:#{queryStudiesBean.editablePatientIndex}:study-dt" action="#{queryStudiesBean.updateStudy()}" oncomplete="PF('editStudy').hide()" value="Save" styleClass="fixed-button-size" />
</div>
<div class="ui-g-12 ui-md-3 ui-lg-3">
<p:commandButton update=":form2" onclick="PF('editStudy').hide()" value="Cancel" styleClass="fixed-button-size" type="button" />
</div>
</h:form>
</p:dialog>
</ui:composition>