Added UI (JSF) and JPA to bayesian network entities.
[simdecs.git] / web / bn / node / Edit.xhtml
diff --git a/web/bn/node/Edit.xhtml b/web/bn/node/Edit.xhtml
new file mode 100644 (file)
index 0000000..076c337
--- /dev/null
@@ -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">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.EditNodeTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+            <h:panelGroup id="messagePanel" layout="block">
+                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+            </h:panelGroup>
+            <h:form>
+                <h:panelGrid columns="2">
+                    <h:outputLabel value="#{bundle.EditNodeLabel_id}" for="id" />
+                    <h:inputText id="id" value="#{nodeController.selected.id}" title="#{bundle.EditNodeTitle_id}" />
+                    <h:outputLabel value="#{bundle.EditNodeLabel_name}" for="name" />
+                    <h:inputText id="name" value="#{nodeController.selected.name}" title="#{bundle.EditNodeTitle_name}" />
+                    <h:outputLabel value="#{bundle.EditNodeLabel_nodeType}" for="nodeType" />
+                    <h:inputText id="nodeType" value="#{nodeController.selected.nodeType}" title="#{bundle.EditNodeTitle_nodeType}" />
+                    <h:outputLabel value="#{bundle.EditNodeLabel_time}" for="time" />
+                    <h:inputText id="time" value="#{nodeController.selected.time}" title="#{bundle.EditNodeTitle_time}" />
+                    <h:outputLabel value="#{bundle.EditNodeLabel_cost}" for="cost" />
+                    <h:inputText id="cost" value="#{nodeController.selected.cost}" title="#{bundle.EditNodeTitle_cost}" />
+                    <h:outputLabel value="#{bundle.EditNodeLabel_bayesianNetwork}" for="bayesianNetwork" />
+                    <h:selectOneMenu id="bayesianNetwork" value="#{nodeController.selected.bayesianNetwork}" title="#{bundle.EditNodeTitle_bayesianNetwork}" >
+                        <f:selectItems value="#{bayesianNetworkController.itemsAvailableSelectOne}"/>
+                    </h:selectOneMenu>
+                </h:panelGrid>
+                <h:commandLink action="#{nodeController.update}" value="#{bundle.EditNodeSaveLink}"/>
+                <br />
+                <br />
+                <h:commandLink action="View" value="#{bundle.EditNodeViewLink}" immediate="true"/>
+                <br />
+                <h:commandLink action="#{nodeController.prepareList}" value="#{bundle.EditNodeShowAllLink}" immediate="true"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.EditNodeIndexLink}" action="/index" immediate="true" />
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>