Up! I put the code of the dialog:
Code: Select all
<p:dialog header="Policy Detail" widgetVar="policyDialog" resizable="false" id="policyDlg"
width="500" showEffect="fade" hideEffect="explode" modal="true">
<h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">
<f:facet name="header">
<p:graphicImage value="/resources/images/user.png" />
</f:facet>
<h:outputText value="Subject:" />
<h:panelGroup>
<h:outputText value="#{userController.findUsername(policyController.selectedPolicy.subject)}" style="font-weight:bold" />
</h:panelGroup>
<h:outputText value="Description:" />
<h:panelGroup>
<h:outputText value="#{policyController.selectedPolicy.description}" style="font-weight:bold"/>
</h:panelGroup>
<h:outputText value="Action:" />
<h:panelGroup>
<h:outputText value="#{policyController.selectedPolicy.action}" style="font-weight:bold"/>
</h:panelGroup>
<h:outputText value="Decision:" rendered="#{policyController.editMode}" />
<h:panelGroup rendered="#{policyController.editMode}">
<p:selectOneMenu value="#{policyView.decision}" style="width: 120px">
<f:selectItems value="#{policyView.decisionItems}" />
</p:selectOneMenu>
</h:panelGroup>
<h:outputText value="Obligations:" rendered="#{policyController.editMode}" />
<h:panelGroup>
<p:selectManyMenu value="#{policyView.obligations}" rendered="#{policyController.editMode}" style="width: 120px">
<f:selectItems value="#{policyView.obligationItems}" />
</p:selectManyMenu>
</h:panelGroup>
<f:facet name="footer">
<p:outputPanel rendered="#{policyController.editMode}" layout="block" style="text-align:right">
<p:commandButton value="Save" update="actives pendings" actionListener="#{policyController.updateXacmlPolicy}" image="ui-icon ui-icon-check" oncomplete="policyDialog.hide()" process="@parent" style="width: 90px"/>
<p:commandButton value="Cancel" onclick="policyDialog.hide()" type="button" image="ui-icon ui-icon-close" style="width: 90px"/>
</p:outputPanel>
</f:facet>
</h:panelGrid>
</p:dialog>
Almost the same than in the example