Added UI (JSF) and JPA to bayesian network entities.
[simdecs.git] / web / bn / answer / Edit.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4       xmlns:ui="http://java.sun.com/jsf/facelets"
5       xmlns:h="http://java.sun.com/jsf/html"
6       xmlns:f="http://java.sun.com/jsf/core">
7
8     <ui:composition template="/template.xhtml">
9         <ui:define name="title">
10             <h:outputText value="#{bundle.EditAnswerTitle}"></h:outputText>
11         </ui:define>
12         <ui:define name="body">
13             <h:panelGroup id="messagePanel" layout="block">
14                 <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
15             </h:panelGroup>
16             <h:form>
17                 <h:panelGrid columns="2">
18                     <h:outputLabel value="#{bundle.EditAnswerLabel_id}" for="id" />
19                     <h:inputText id="id" value="#{answerController.selected.id}" title="#{bundle.EditAnswerTitle_id}" />
20                     <h:outputLabel value="#{bundle.EditAnswerLabel_text}" for="text" />
21                     <h:inputText id="text" value="#{answerController.selected.text}" title="#{bundle.EditAnswerTitle_text}" />
22                     <h:outputLabel value="#{bundle.EditAnswerLabel_likelihood}" for="likelihood" />
23                     <h:inputText id="likelihood" value="#{answerController.selected.likelihood}" title="#{bundle.EditAnswerTitle_likelihood}" />
24                     <h:outputLabel value="#{bundle.EditAnswerLabel_question}" for="question" />
25                     <h:selectOneMenu id="question" value="#{answerController.selected.question}" title="#{bundle.EditAnswerTitle_question}" >
26                         <f:selectItems value="#{questionController.itemsAvailableSelectOne}"/>
27                     </h:selectOneMenu>
28                 </h:panelGrid>
29                 <h:commandLink action="#{answerController.update}" value="#{bundle.EditAnswerSaveLink}"/>
30                 <br />
31                 <br />
32                 <h:commandLink action="View" value="#{bundle.EditAnswerViewLink}" immediate="true"/>
33                 <br />
34                 <h:commandLink action="#{answerController.prepareList}" value="#{bundle.EditAnswerShowAllLink}" immediate="true"/>
35                 <br />
36                 <br />
37                 <h:commandLink value="#{bundle.EditAnswerIndexLink}" action="/index" immediate="true" />
38             </h:form>
39         </ui:define>
40     </ui:composition>
41
42 </html>