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 0000000000000000000000000000000000000000..323b6d33e92ac2f3fa093be9a077a01901229c79 --- /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 0000000000000000000000000000000000000000..c6a50dd0f3b223f6b9acaea54dc2ae0a7e234176 --- /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 0000000000000000000000000000000000000000..57ec214d2e79a36e2b1d6ecf74aaf04b37fd8c95 --- /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 0000000000000000000000000000000000000000..92446e26ce517b8f7c8df30821db4bc595356426 --- /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 0000000000000000000000000000000000000000..8f0e1ba70c5a95e5092093e5f7b35815279772a7 --- /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 0000000000000000000000000000000000000000..de85f39c48d69d8ca04801023b2c6e95c9341ad8 --- /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 0000000000000000000000000000000000000000..d3c325c6b295e8d1ddaf8a206c0d42e9d2e57655 --- /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 0000000000000000000000000000000000000000..393615991e88228bc71b1cbaca82ff2df2c6422b --- /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 0000000000000000000000000000000000000000..945113b8022e84f3254a63bd7a22d140fee25f4f --- /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 0000000000000000000000000000000000000000..b8baac24f3c6fb3ccf3be4b4686438635e8d24cf --- /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 0000000000000000000000000000000000000000..639c08821333fed497d7d4f1c2fc51fc3ae00c91 --- /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 0000000000000000000000000000000000000000..25855c5caf4697f6330f7be5cd37486d7f8eb8a3 --- /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 0000000000000000000000000000000000000000..e83051960bc8d1ceb58cbeb95dd917201625b121 --- /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 0000000000000000000000000000000000000000..4cba95823a85eff93aa59ff7e1a22184f33ac365 --- /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>