From 593bae57e21b243455c3693b8217bfaa6e2a5904 Mon Sep 17 00:00:00 2001
From: "Barbara B. Frosik" <bfrosik@aps.anl.gov>
Date: Fri, 13 Feb 2015 23:05:27 +0000
Subject: [PATCH]

---
 .../allowedPolicyValueCreatePanelGrid.xhtml   | 25 ++++++++
 .../allowedPolicyValueDestroyDialog.xhtml     | 13 ++++
 .../allowedPolicyValueEditPanelGrid.xhtml     | 23 ++++++++
 .../allowedPolicyValueListDataTable.xhtml     | 59 +++++++++++++++++++
 .../allowedPolicyValueViewPanelGrid.xhtml     | 23 ++++++++
 .../policyType/createAllowedPolicyValue.xhtml | 31 ++++++++++
 .../web/views/policyType/edit.xhtml           | 47 +++++++++++++++
 .../policyType/editAllowedPolicyValue.xhtml   | 33 +++++++++++
 .../web/views/policyType/list.xhtml           | 36 +++++++++++
 .../policyType/policyTypeEditPanelGrid.xhtml  | 19 ++++++
 .../policyType/policyTypeListDataTable.xhtml  | 44 ++++++++++++++
 .../policyType/policyTypeViewPanelGrid.xhtml  | 20 +++++++
 .../web/views/policyType/view.xhtml           | 46 +++++++++++++++
 .../policyType/viewAllowedPolicyValue.xhtml   | 41 +++++++++++++
 14 files changed, 460 insertions(+)
 create mode 100644 src/java/DmWebPortal/web/views/policyType/allowedPolicyValueCreatePanelGrid.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/allowedPolicyValueDestroyDialog.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/allowedPolicyValueEditPanelGrid.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/allowedPolicyValueListDataTable.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/allowedPolicyValueViewPanelGrid.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/createAllowedPolicyValue.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/edit.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/editAllowedPolicyValue.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/list.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/policyTypeEditPanelGrid.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/policyTypeListDataTable.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/policyTypeViewPanelGrid.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/view.xhtml
 create mode 100644 src/java/DmWebPortal/web/views/policyType/viewAllowedPolicyValue.xhtml

diff --git a/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueCreatePanelGrid.xhtml
new file mode 100644
index 00000000..323b6d33
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueCreatePanelGrid.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:h="http://java.sun.com/jsf/html"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+    <c:set var="allowedPolicyValueObject" value="#{allowedPolicyValueController.selected}"/>
+
+    <p:panelGrid columns="2" styleClass="createEntityDetails">
+
+        <h:outputLabel for="policyValue" value="Policy Value" styleClass="entityDataEmphasizedLabel"/>
+        <h:inputText id="policyValue" value="#{allowedPolicyValueObject.policyValue}" title="Policy Value" styleClass="entityDataEmphasizedText"/> 
+
+        <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
+        <h:inputText id="description" value="#{allowedPolicyValueObject.description}" title="Description" styleClass="entityDataText"/>        
+
+        <h:outputLabel for="policyType" value="Policy Type" styleClass="entityDataLabel"/>
+        <h:outputText id="policyType" value="#{allowedPolicyValueController.policyType.name}" title="Policy Type" styleClass="entityDataText"/>
+
+    </p:panelGrid>
+
+</ui:composition>
+
diff --git a/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueDestroyDialog.xhtml
new file mode 100644
index 00000000..c6a50dd0
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueDestroyDialog.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <p:confirmDialog id="allowedPolicyValueDestroyDialog" message="Delete experiment type #{allowedPolicyValueController.getCurrentEntityInstanceName()}?"
+                     header="Delete Allowed Policy Value" severity="alert" widgetVar="allowedPolicyValueDestroyDialogWidget"
+                     styleClass="dialog">
+        <p:commandButton value="Yes" oncomplete="allowedPolicyValueDestroyDialogWidget.hide()" action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}" actionListener="#{allowedPolicyValueController.destroy()}"/>
+        <p:commandButton value="No" onclick="PF('allowedPolicyValueDestroyDialogWidget').hide()" type="button" />
+    </p:confirmDialog>  
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueEditPanelGrid.xhtml
new file mode 100644
index 00000000..57ec214d
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueEditPanelGrid.xhtml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:h="http://java.sun.com/jsf/html"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+                xmlns:f="http://xmlns.jcp.org/jsf/core">
+
+    <ui:param name="allowedPolicyValueObject" value="#{allowedPolicyValueController.current}"/>
+
+    <p:panelGrid columns="2" styleClass="editEntityDetails"> 
+
+        <h:outputLabel for="policyValue" value="Policy Value" styleClass="entityDataEmphasizedLabel"/>
+        <h:inputText id="policyValue" value="#{allowedPolicyValueObject.policyValue}" title="Policy Value" styleClass="entityDataEmphasizedText"/> 
+
+        <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
+        <h:inputText id="description" value="#{allowedPolicyValueObject.description}" title="Description" styleClass="entityDataText"/>        
+
+        <h:outputLabel for="policyType" value="Policy Type" styleClass="entityDataLabel"/>
+        <h:outputText id="policyType" value="#{allowedPolicyValueController.policyType.name}" title="Policy Type" styleClass="entityDataText"/>
+       
+    </p:panelGrid>
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueListDataTable.xhtml b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueListDataTable.xhtml
new file mode 100644
index 00000000..92446e26
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueListDataTable.xhtml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+       <div class="actionButton">
+        <p:commandButton id="AllowedPolicyValueAddButton" action="#{allowedPolicyValueController.prepareCreate()}" rendered="#{loginController.admin}" value="Add" alt="Add new AllowedPolicyValue" icon="ui-icon-plus">
+            <p:tooltip for="AllowedPolicyValueAddButton" value="Create new AllowedPolicyValue."/>
+        </p:commandButton>
+        
+        <p:commandButton id="AllowedPolicyValueResetFiltersButton" action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}"  actionListener="#{allowedPolicyValueController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight">
+            <p:tooltip for="AllowedPolicyValueResetFiltersButton" value="Reset list filters."/>
+        </p:commandButton>
+
+        <p:commandButton id="AllowedPolicyValueNoOp" style="visibility:hidden" value="NoOp"/>
+        <p:defaultCommand target="AllowedPolicyValueNoOp"/>
+    </div>
+                
+    <p:dataTable id="allowedPolicyValueListDataTable"                              
+                 var="allowedPolicyValueObject" 
+                 value="#{allowedPolicyValueController.listDataModel}" 
+                 filteredValue="#{allowedPolicyValueController.filteredObjectList}"
+                 paginator="true" 
+                 paginatorAlwaysVisible="false" 
+                 rows="25"
+                 binding="#{allowedPolicyValueController.listDataTable}"
+                 widgetVar="allowedPolicyValueListWidget" 
+                 emptyMessage="No experiment types found.">
+
+        <p:column sortBy="#{allowedPolicyValueObject.id}" headerText="Id" >
+            <h:outputText value="#{allowedPolicyValueObject.id}"/>
+        </p:column>
+
+        <p:column sortBy="#{allowedPolicyValueObject.policyValue}" headerText="Allowed Policy Value" 
+                  filterBy="#{allowedPolicyValueObject.policyValue}" filterMatchMode="contains" >
+            <h:outputText value="#{allowedPolicyValueObject.policyValue}"/>
+        </p:column>
+
+        <p:column sortBy="#{allowedPolicyValueObject.description}" headerText="Description" 
+                  filterBy="#{allowedPolicyValueObject.description}" filterMatchMode="contains">
+            <h:outputText value="#{allowedPolicyValueObject.description}"/>
+        </p:column>
+
+        <p:column headerText="Actions" >
+            <div class="actionLink">
+                <h:commandLink  action="#{allowedPolicyValueController.prepareView(allowedPolicyValueObject)}" styleClass="ui-icon ui-icon-info" title="View"/>
+                <h:commandLink action="#{allowedPolicyValueController.prepareEdit(allowedPolicyValueObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/>
+                <p:commandLink oncomplete="PF('allowedPolicyValueDestroyDialogWidget').show()" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form">
+                    <f:setPropertyActionListener value="#{allowedPolicyValueObject}" target="#{allowedPolicyValueController.current}"/>
+                </p:commandLink>
+            </div>
+        </p:column>
+    </p:dataTable>
+
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueViewPanelGrid.xhtml
new file mode 100644
index 00000000..8f0e1ba7
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/allowedPolicyValueViewPanelGrid.xhtml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:h="http://java.sun.com/jsf/html"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <ui:param name="allowedPolicyValueObject" value="#{allowedPolicyValueController.selected}"/>
+
+    <p:panelGrid columns="2" styleClass="viewEntityDetails">
+
+        <h:outputLabel for="allowedPolicyValue" value="Policy Value" styleClass="entityDataEmphasizedLabel"/>
+        <h:outputText id="allowedPolicyValue" value="#{allowedPolicyValueObject.policyValue}" title="Allowed Policy Value" styleClass="entityDataEmphasizedText"/>
+
+        <h:outputLabel for="policyType" value="Policy Type" styleClass="entityDataLabel"/>
+        <h:outputText id="policyType" value="#{allowedPolicyValueObject.policyType.name}" title="Policy Type" styleClass="entityDataText"/>
+ 
+        <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
+        <h:outputText id="description" value="#{allowedPolicyValueObject.description}" title="Description" styleClass="entityDataText"/>
+ 
+    </p:panelGrid>
+
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/createAllowedPolicyValue.xhtml b/src/java/DmWebPortal/web/views/policyType/createAllowedPolicyValue.xhtml
new file mode 100644
index 00000000..de85f39c
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/createAllowedPolicyValue.xhtml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+    
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+    <ui:define name="middleCenter">
+        <div class="pageTitle">
+            <h1>Add Allowed Policy Value</h1>
+        </div>
+
+        <h:form id="addAllowedPolicyValueForm">
+
+            <ui:include src="allowedPolicyValueCreatePanelGrid.xhtml"/>
+
+            <p/>
+            <div class="actionButton">
+                <p:commandButton action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}" actionListener="#{allowedPolicyValueController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/>
+                <p:commandButton action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/>
+            </div>
+        </h:form>
+
+    </ui:define>
+    </ui:composition>
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/edit.xhtml b/src/java/DmWebPortal/web/views/policyType/edit.xhtml
new file mode 100644
index 00000000..d3c325c6
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/edit.xhtml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+    
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+        <ui:define name="middleCenter">
+            <h:form id="editPolicyTypeForm">
+
+                <div class="middleCenterLeftContent">
+                    <div class="pageTitle">
+                        <h1>Edit #{policyTypeController.current.name} Policy Type</h1>
+                    </div>
+
+
+                    <ui:param name="policyTypeObject" value="#{policyTypeController.selected}"/>
+                    <p:accordionPanel multiple="true" activeIndex="0,1" >
+                        <p:tab title="Policy Type Properties">
+                            <div class="middleCenterLeftContent">
+                                <ui:include src="policyTypeEditPanelGrid.xhtml"/>
+                            </div>
+                        </p:tab>
+
+                        <p:tab title="Allowed Policy Values">                
+                            <ui:include src="allowedPolicyValueListDataTable.xhtml"/>
+                        </p:tab>
+                    </p:accordionPanel>
+
+                    <p/>
+
+                    <div class="actionButton">
+                        <p:commandButton action="#{policyTypeController.update()}" actionListener="#{allowedPolicyValueController.clear()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/>
+                        <p:commandButton action="#{policyTypeController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/>
+                    </div>
+                </div>
+
+            </h:form>
+
+        </ui:define>
+    </ui:composition>
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/editAllowedPolicyValue.xhtml b/src/java/DmWebPortal/web/views/policyType/editAllowedPolicyValue.xhtml
new file mode 100644
index 00000000..39361599
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/editAllowedPolicyValue.xhtml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+    
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+    <ui:define name="middleCenter">
+        <h:form id="editAllowedPolicyValueForm">
+
+            <div class="middleCenterLeftContent">
+                <div class="pageTitle">
+                    <h1>Edit Policy</h1>
+                </div>
+
+                <ui:include src="allowedPolicyValueEditPanelGrid.xhtml"/>
+                <p/>
+                <div class="actionButton">
+                    <p:commandButton action="#{allowedPolicyValueController.update()}" value="Save" alt="Save" icon="ui-icon-check"/>
+                    <p:commandButton action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/>
+                </div>
+            </div>
+
+        </h:form>
+
+    </ui:define>
+    </ui:composition>
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/list.xhtml b/src/java/DmWebPortal/web/views/policyType/list.xhtml
new file mode 100644
index 00000000..945113b8
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/list.xhtml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+    <ui:define name="middleCenter">
+        <div class="pageTitle">
+            <h1>Policy Types</h1>
+        </div>
+
+        <h:form id="viewEntityTypeListForm">
+            <ui:param name="entityController" value="#{policyTypeController}"/>
+
+            <div class="actionButton">
+                <p:commandButton id="#{entityTypeName}ResetFiltersButton" action="#{entityController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight">
+                    <p:tooltip for="#{entityTypeName}ResetFiltersButton" value="Reset list filters."/>
+                </p:commandButton>
+                <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/>
+                <p:defaultCommand target="#{entityTypeName}NoOp"/>
+            </div>
+
+            <h:panelGroup>  
+                <ui:include src="policyTypeListDataTable.xhtml"/>
+            </h:panelGroup>
+
+        </h:form>
+
+    </ui:define>
+    </ui:composition>
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/policyTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/policyTypeEditPanelGrid.xhtml
new file mode 100644
index 00000000..b8baac24
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/policyTypeEditPanelGrid.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:h="http://java.sun.com/jsf/html"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <ui:param name="policyTypeObject" value="#{policyTypeController.current}"/>
+
+    <p:panelGrid columns="2" styleClass="editEntityDetails"> 
+
+        <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
+        <h:outputText id="name" value="#{policyTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
+
+        <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
+        <h:inputText id="description" value="#{policyTypeObject.description}" title="Description" styleClass="entityDataText"/>     
+        
+    </p:panelGrid>
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/policyTypeListDataTable.xhtml b/src/java/DmWebPortal/web/views/policyType/policyTypeListDataTable.xhtml
new file mode 100644
index 00000000..639c0882
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/policyTypeListDataTable.xhtml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+    <p:dataTable id="policyTypeListDataTable"                              
+                 var="policyTypeObject" 
+                 value="#{policyTypeController.listDataModel}" 
+                 filteredValue="#{policyTypeController.filteredObjectList}"
+                 paginator="true" 
+                 paginatorAlwaysVisible="false" 
+                 rows="25"
+                 binding="#{policyTypeController.listDataTable}"
+                 widgetVar="policyTypeListWidget" 
+                 emptyMessage="No role types found." >
+
+
+        <p:column sortBy="#{policyTypeObject.id}" headerText="Id" >
+            <h:outputText value="#{policyTypeObject.id}"/>
+        </p:column>
+
+        <p:column sortBy="#{policyTypeObject.name}" headerText="Policy Type" 
+                  filterBy="#{policyTypeObject.name}" filterMatchMode="contains" >
+            <h:outputText value="#{policyTypeObject.name}"/>
+        </p:column>
+
+        <p:column sortBy="#{policyTypeObject.description}" headerText="Description" 
+                  filterBy="#{policyTypeObject.description}" filterMatchMode="contains">
+            <h:outputText value="#{policyTypeObject.description}"/>
+        </p:column>
+
+        <p:column headerText="Actions" >
+            <div class="actionLink">
+                <p:commandLink action="#{policyTypeController.prepareView(policyTypeObject)}" actionListener="#{allowedPolicyValueController.setPolicyType(policyTypeObject)}" styleClass="ui-icon ui-icon-info" title="View"/>
+                <p:commandLink action="#{policyTypeController.prepareEdit(policyTypeObject)}" actionListener="#{allowedPolicyValueController.setPolicyType(policyTypeObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/>
+            </div>
+        </p:column>
+    </p:dataTable>
+
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/policyTypeViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/policyTypeViewPanelGrid.xhtml
new file mode 100644
index 00000000..25855c5c
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/policyTypeViewPanelGrid.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:h="http://java.sun.com/jsf/html"
+                xmlns:p="http://primefaces.org/ui"
+                xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <ui:param name="policyTypeObject" value="#{policyTypeController.current}"/>
+
+    <p:panelGrid columns="2" styleClass="viewEntityDetails">
+
+        <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
+        <h:outputText id="name" value="#{policyTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
+
+        <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
+        <h:outputText id="description" value="#{policyTypeObject.description}" title="Description" styleClass="entityDataText"/>
+        
+    </p:panelGrid>
+
+</ui:composition>
\ No newline at end of file
diff --git a/src/java/DmWebPortal/web/views/policyType/view.xhtml b/src/java/DmWebPortal/web/views/policyType/view.xhtml
new file mode 100644
index 00000000..e8305196
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/view.xhtml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+        <ui:define name="middleCenter">
+            <h:form id="viewPolicyTypeForm">
+
+                <div class="middleCenterLeftContent">
+                    <div class="pageTitle">
+                        <h1>#{policyTypeController.current.name} Policy Type Details</h1>
+                    </div>
+
+                    <ui:param name="policyTypeObject" value="#{policyTypeController.selected}"/>
+                    <p:accordionPanel multiple="true" activeIndex="0,1" >
+                        <p:tab title="Policy Type Properties">
+                            <div class="middleCenterLeftContent">
+                                <ui:include src="policyTypeViewPanelGrid.xhtml"/>
+                            </div>
+                        </p:tab>
+
+                        <p:tab title="Allowed Policy Values">                
+                            <ui:include src="allowedPolicyValueListDataTable.xhtml"/>
+                        </p:tab>
+                    </p:accordionPanel>
+
+                    <p/>
+
+                    <div class="actionButton">
+                        <p:commandButton action="#{policyTypeController.prepareEdit(policyTypeObject)}" actionListener="#{allowedPolicyValueController.clear()}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/>
+                        <p:commandButton action="#{policyTypeController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/>
+                    </div>          
+                </div>
+            <ui:include src="allowedPolicyValueDestroyDialog.xhtml"/>
+            </h:form>
+
+        </ui:define>
+    </ui:composition>
+
+</ui:composition>
diff --git a/src/java/DmWebPortal/web/views/policyType/viewAllowedPolicyValue.xhtml b/src/java/DmWebPortal/web/views/policyType/viewAllowedPolicyValue.xhtml
new file mode 100644
index 00000000..4cba9582
--- /dev/null
+++ b/src/java/DmWebPortal/web/views/policyType/viewAllowedPolicyValue.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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"
+                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+    <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/>
+    <ui:composition template="../../templates/dmViewTemplate.xhtml">
+    <ui:define name="middleCenter">
+        <h:form id="viewAllowedPolicyValueForm">
+
+            <div class="middleCenterLeftContent">
+                <div class="pageTitle">
+                    <h1>Policy Details</h1>
+                </div>
+
+                <ui:include src="allowedPolicyValueViewPanelGrid.xhtml"/>
+
+                <p/>
+                <ui:param name="allowedPolicyValueObject" value="#{allowedPolicyValueController.selected}"/>
+                <div class="actionButton">
+                    <p:commandButton action="#{allowedPolicyValueController.prepareEdit(allowedPolicyValueObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/>
+                    <p:commandButton onclick="PF('allowedPolicyValueDestroyDialogWidget').show();" rendered="#{loginController.admin}" value="Delete" alt="Delete" icon="ui-icon-trash">
+                        <f:setPropertyActionListener value="#{allowedPolicyValueObject}" target="#{allowedPolicyValueController.current}"/>
+                    </p:commandButton>  
+                    <p:commandButton action="#{policyTypeController.prepareView(allowedPolicyValueController.policyType)}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/>
+                </div>
+
+                <ui:include src="allowedPolicyValueDestroyDialog.xhtml"/>
+
+            </div>
+
+        </h:form>
+
+    </ui:define>
+    </ui:composition>
+
+</ui:composition>
-- 
GitLab