Added UI (JSF) and JPA to bayesian network entities.
[simdecs.git] / web / bn / question / Edit.xhtml
diff --git a/web/bn/question/Edit.xhtml b/web/bn/question/Edit.xhtml
new file mode 100644 (file)
index 0000000..d2c8f73
--- /dev/null
@@ -0,0 +1,40 @@
+<?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.EditQuestionTitle}"></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.EditQuestionLabel_id}" for="id" />
+                    <h:inputText id="id" value="#{questionController.selected.id}" title="#{bundle.EditQuestionTitle_id}" />
+                    <h:outputLabel value="#{bundle.EditQuestionLabel_text}" for="text" />
+                    <h:inputText id="text" value="#{questionController.selected.text}" title="#{bundle.EditQuestionTitle_text}" />
+                    <h:outputLabel value="#{bundle.EditQuestionLabel_node}" for="node" />
+                    <h:selectOneMenu id="node" value="#{questionController.selected.node}" title="#{bundle.EditQuestionTitle_node}" >
+                        <f:selectItems value="#{nodeController.itemsAvailableSelectOne}"/>
+                    </h:selectOneMenu>
+                </h:panelGrid>
+                <h:commandLink action="#{questionController.update}" value="#{bundle.EditQuestionSaveLink}"/>
+                <br />
+                <br />
+                <h:commandLink action="View" value="#{bundle.EditQuestionViewLink}" immediate="true"/>
+                <br />
+                <h:commandLink action="#{questionController.prepareList}" value="#{bundle.EditQuestionShowAllLink}" immediate="true"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.EditQuestionIndexLink}" action="/index" immediate="true" />
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>