Skip to content
Snippets Groups Projects
Commit bec08be6 authored by sveseli's avatar sveseli
Browse files

update experiment and station views for the recent db changes; add ability to...

update experiment and station views for the recent db changes; add ability to assign experiment types to station
parent 383beaeb
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,16 @@ ...@@ -13,6 +13,16 @@
<h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
<h:inputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedInputText"/> <h:inputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedInputText"/>
<h:outputLabel for="experimentStation" value="Experiment Station" styleClass="entityDataLabel"/>
<p:selectOneMenu id="experimentStation" value="#{experimentObject.experimentStation}" styleClass="entityDataInputText">
<f:selectItem itemLabel="Select Station" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{experimentStationController.getAvailableExperimentStations()}"
var="experimentStation"
itemValue="#{experimentStation}"
itemLabel="#{experimentStation.name}"
itemDescription="#{experimentStation.description}" />
</p:selectOneMenu>
<h:outputLabel for="experimentType" value="Experiment Type" styleClass="entityDataLabel"/> <h:outputLabel for="experimentType" value="Experiment Type" styleClass="entityDataLabel"/>
<p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataInputText"> <p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataInputText">
<f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" /> <f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
...@@ -22,20 +32,23 @@ ...@@ -22,20 +32,23 @@
itemLabel="#{experimentType.name}" itemLabel="#{experimentType.name}"
itemDescription="#{experimentType.description}" /> itemDescription="#{experimentType.description}" />
</p:selectOneMenu> </p:selectOneMenu>
<h:outputLabel for="experimentStation" value="Experiment Station" styleClass="entityDataLabel"/> <h:outputLabel for="primaryStorage" value="Primary Storage" styleClass="entityDataLabel"/>
<p:selectOneMenu id="experimentStation" value="#{experimentObject.experimentStation}" styleClass="entityDataInputText"> <p:selectOneMenu id="primaryStorage" value="#{experimentObject.primaryStorage}" styleClass="entityDataInputText">
<f:selectItem itemLabel="Select Station" itemValue="" noSelectionOption="true" /> <f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{experimentStationController.getAvailableExperimentStations()}" <f:selectItems value="#{storageController.getAvailableItems()}"
var="experimentStation" var="storage"
itemValue="#{experimentStation}" itemValue="#{storage}"
itemLabel="#{experimentStation.name}" itemLabel="#{storage.name}"
itemDescription="#{experimentStation.description}" /> itemDescription="#{storage.description}" />
</p:selectOneMenu> </p:selectOneMenu>
<h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
<h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/> <h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/>
<h:outputLabel for="rootPath" value="Storage Root Path" styleClass="entityDataLabel"/>
<h:inputText id="rootPath" value="#{experimentObject.rootPath}" title="Storage Root Path" styleClass="entityDataInputText"/>
<h:outputLabel for="startDate" value="Start Date"/> <h:outputLabel for="startDate" value="Start Date"/>
<p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> <p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" />
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" <ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html" xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui" xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:param name="experimentObject" value="#{experimentController.current}"/> <ui:param name="experimentObject" value="#{experimentController.current}"/>
...@@ -11,16 +12,36 @@ ...@@ -11,16 +12,36 @@
<h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/>
<h:outputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> <h:outputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/>
<h:outputLabel for="experimentType" value="Type" styleClass="entityDataLabel"/>
<h:outputText id="experimentType" value="#{experimentObject.experimentType.name}" title="Type" styleClass="entityDataText"/>
<h:outputLabel for="experimentStation" value="Station" styleClass="entityDataLabel"/> <h:outputLabel for="experimentStation" value="Station" styleClass="entityDataLabel"/>
<h:outputText id="experimentStation" value="#{experimentObject.experimentStation.name}" title="Station" styleClass="entityDataText"/> <h:outputText id="experimentStation" value="#{experimentObject.experimentStation.name}" title="Station" styleClass="entityDataText"/>
<h:outputLabel for="experimentType" value="Experiment Type" styleClass="entityDataLabel"/>
<p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataInputText">
<f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{experimentTypeController.getAvailableItems()}"
var="experimentType"
itemValue="#{experimentType}"
itemLabel="#{experimentType.name}"
itemDescription="#{experimentType.description}" />
</p:selectOneMenu>
<h:outputLabel for="primaryStorage" value="Primary Storage" styleClass="entityDataLabel"/>
<p:selectOneMenu id="primaryStorage" value="#{experimentObject.primaryStorage}" styleClass="entityDataInputText">
<f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{storageController.getAvailableItems()}"
var="storage"
itemValue="#{storage}"
itemLabel="#{storage.name}"
itemDescription="#{storage.description}" />
</p:selectOneMenu>
<h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
<h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/> <h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/>
<h:outputLabel for="rootPath" value="Storage Root Path" styleClass="entityDataLabel"/>
<h:inputText id="rootPath" value="#{experimentObject.rootPath}" title="Storage Root Path" styleClass="entityDataInputText"/>
<h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/> <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/>
<p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> <p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" />
......
...@@ -18,10 +18,16 @@ ...@@ -18,10 +18,16 @@
<h:outputLabel for="experimentStation" value="Station" styleClass="entityDataLabel"/> <h:outputLabel for="experimentStation" value="Station" styleClass="entityDataLabel"/>
<h:outputText id="experimentStation" value="#{experimentObject.experimentStation.name}" title="Station" styleClass="entityDataText"/> <h:outputText id="experimentStation" value="#{experimentObject.experimentStation.name}" title="Station" styleClass="entityDataText"/>
<h:outputLabel for="primaryStorage" value="Primary Storage" styleClass="entityDataLabel"/>
<h:outputText id="primaryStorage" value="#{experimentObject.primaryStorage.name}" title="Primary Storage" styleClass="entityDataText"/>
<h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/>
<h:outputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/> <h:outputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/>
<h:outputLabel for="rootPath" value="Storage Root Path" styleClass="entityDataLabel"/>
<h:outputText id="rootPath" value="#{experimentObject.rootPath}" title="Storage Root Path" styleClass="entityDataText"/>
<h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/> <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/>
<h:outputText id="startDate" value="#{experimentObject.startDate}" styleClass="entityDataText"> <h:outputText id="startDate" value="#{experimentObject.startDate}" styleClass="entityDataText">
<f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" /> <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" />
......
<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<p:dialog id="stationExperimentTypeAddDialog"
widgetVar="stationExperimentTypeAddDialogWidget"
header="Select Experiment Type"
styleClass="dialog">
<div class="dialog">
<ui:include src="stationExperimentTypeSelectDataTable.xhtml"/>
<f:facet name="footer" class="dialog">
<div class="actionButton" align="center">
<p:commandButton value="Add" alt="Add"
action="#{experimentStationController.addExperimentType()}"
onclick="PF('stationExperimentTypeSelectDataTableWidget').filter()"
oncomplete="PF('stationExperimentTypeAddDialogWidget').hide()"
update="@form"
immediate="true"
icon="ui-icon-arrowreturnthick-1-w"
styleClass="dialog">
</p:commandButton>
<p:commandButton value="Cancel" alt="Cancel"
onclick="PF('stationExperimentTypeAddDialogWidget').hide()"
update="@form"
immediate="true"
icon="ui-icon-close"
styleClass="dialog">
</p:commandButton>
</div>
</f:facet>
</div>
</p:dialog>
</ui:composition>
<?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">
<div class="actionButton">
<p:commandButton id="stationExperimentTypeAddButton"
action="#{experimentStationController.prepareAddExperimentType(stationObject)}"
oncomplete="PF('stationExperimentTypeAddDialogWidget').show()"
rendered="#{loginController.admin}"
value="Add" alt="Add station experiment type." icon="ui-icon-plus">
<p:tooltip for="stationExperimentTypeAddButton" value="Add station experiment type."/>
</p:commandButton>
</div>
<ui:include src="stationExperimentTypeAddDialog.xhtml"/>
<ui:param name="breadcrumb" value="#{experimentStationController.currentViewId}"/>
<ui:param name="breadcrumbObjectId" value="#{stationObject.id}"/>
<p:dataTable id="stationExperimentTypeListDataTable"
var="stationExperimentTypeObject"
value="#{stationObject.experimentTypeList}"
paginator="true"
paginatorAlwaysVisible="false"
rows="#{experimentStationController.displayNumberOfItemsPerPage}"
widgetVar="stationExperimentTypeListWidget"
emptyMessage="No experiment types found.">
<p:column sortBy="#{stationExperimentTypeObject.name}" headerText="Username"
filterBy="#{stationExperimentTypeObject.name}" filterMatchMode="contains" >
<h:outputLink value="../stationExperimentType/view.xhtml?id=#{stationExperimentTypeObject.id}&amp;breadcrumb=#{breadcrumb}&amp;breadcrumbObjectId=#{breadcrumbObjectId}"
title="Experiment Type: #{stationExperimentTypeObject.name}">
<h:outputText value="#{stationExperimentTypeObject.name}"/>
</h:outputLink>
</p:column>
<p:column headerText="Actions" >
<div class="actionLink">
<p:commandLink action="#{experimentStationController.deleteExperimentType(stationExperimentTypeObject)}"
styleClass="ui-icon ui-icon-trash" title="Delete"
update="stationExperimentTypeListDataTable"
rendered="#{loginController.admin}"
immediate="true"/>
</div>
</p:column>
</p:dataTable>
</ui:composition>
<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<ui:fragment>
<p:dataTable id="stationExperimentTypeSelectDataTable"
widgetVar="stationExperimentTypeSelectDataTableWidget"
var="experimentTypeObject"
value="#{experimentTypeController.selectDataModel}"
rowKey="#{experimentTypeObject.name}"
selectionMode="single"
selection="#{experimentStationController.currentExperimentType}"
paginator="true"
paginatorAlwaysVisible="true"
rows="#{experimentTypeController.selectNumberOfItemsPerPage}"
emptyMessage="No available records found.">
<p:column sortBy="#{experimentTypeObject.name}" headerText="Name"
filterBy="#{experimentTypeObject.name}">
<h:outputText value="#{experimentTypeObject.name}"/>
</p:column>
</p:dataTable>
</ui:fragment>
</ui:composition>
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
</div> </div>
</p:tab> </p:tab>
<p:tab title="Station Experiments"> <p:tab title="Experiment Types">
<div class="middleCenterLeftContent"> <div class="middleCenterLeftContent">
<ui:include src="private/stationExperimentListDataTable.xhtml"/> <ui:include src="private/stationExperimentTypeListDataTable.xhtml"/>
</div> </div>
</p:tab> </p:tab>
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
<ui:include src="private/stationManagerListDataTable.xhtml"/> <ui:include src="private/stationManagerListDataTable.xhtml"/>
</div> </div>
</p:tab> </p:tab>
<p:tab title="Station Experiments">
<div class="middleCenterLeftContent">
<ui:include src="private/stationExperimentListDataTable.xhtml"/>
</div>
</p:tab>
</p:accordionPanel> </p:accordionPanel>
<div class="actionButton"> <div class="actionButton">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment