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:p="http://primefaces.prime.com.tr/ui"
5 xmlns:h="http://java.sun.com/jsf/html"
6 xmlns:f="http://java.sun.com/jsf/core">
9 <h:outputStylesheet name="css/jsfcrud.css"/>
12 <h:outputLabel> <h1>SimDeCS - Cadastro de Redes Bayesianas</h1> </h:outputLabel>
14 <h:form enctype="multipart/form-data">
16 <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"
20 allowTypes="/(\.|\/)(xml)$/"/>
22 <p:growl id="messages" showDetail="true"/>
26 <h:panelGroup id="messagePanel" layout="block">
27 <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
29 <p:panel header="Redes Bayesianas" toggleable="true" toggleListener="#{bayesianNetworkController.prepareList}">
32 <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
34 <h:panelGrid columns="2" cellpadding="10">
35 <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
36 <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
38 <h:form id="fBayesianNetworkList">
40 <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList"
41 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
42 rowEditListener="#{bayesianNetworkController.rowEditListener}">
43 <p:column headerText="id">
44 <h:outputText value="#{bayesianNetwork.id}"/>
47 <p:column headerText="Nome">
49 <f:facet name="output">
50 <h:outputText value="#{bayesianNetwork.name}"/>
52 <f:facet name="input">
53 <p:inputText value="#{bayesianNetwork.name}"/>
57 <p:column headerText="Opções">
59 <h:commandLink action="#{bayesianNetworkController.destroy}" >
60 <h:graphicImage value="/img/bayesianNetwork/remove.png" />
69 <p:panel header="Nodos" toggleable="true">
72 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
74 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
75 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
77 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
78 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
79 rowEditListener="#{nodeController.rowEditListener}">
81 <p:column headerText="id">
82 <h:outputText value="#{node.id}" />
85 <p:column headerText="Nome">
87 <f:facet name="output">
88 <h:outputText value="#{node.name}" />
90 <f:facet name="input">
91 <p:inputText value="#{node.name}" style="width:100%"/>
95 <p:column headerText="Tempo">
97 <f:facet name="output">
98 <h:outputText value="#{node.time}" />
100 <f:facet name="input">
101 <p:inputText value="#{node.time}" style="width:100%"/>
105 <p:column headerText="Custo">
107 <f:facet name="output">
108 <h:outputText value="#{node.cost}" />
110 <f:facet name="input">
111 <p:inputText value="#{node.cost}" style="width:100%"/>
115 <p:column headerText="Tipo">
117 <f:facet name="output">
118 <h:outputText value="#{node.nodeType}" />
120 <f:facet name="input">
121 <h:selectOneMenu value="#{node.nodeType}" >
122 <f:selectItems value="#{nodeTypeController.nodeTypes}"
124 itemLabel="#{nodeType}"
125 itemValue="#{nodeType}" />
130 <p:column headerText="Rede Bayesiana">
131 <h:outputText value="#{node.bayesianNetwork.name}"/>
135 <p:column headerText="Opções">
144 <p:panel header="Perguntas" toggleable="true">
147 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
150 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
151 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
152 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
153 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
154 rowEditListener="#{questionController.rowEditListener}">
156 <p:column headerText="id">
157 <h:outputText value="#{question.id}" />
160 <p:column headerText="Texto">
162 <f:facet name="output">
163 <h:outputText value="#{question.text}" />
165 <f:facet name="input">
166 <p:inputText value="#{question.text}" style="width:100%"/>
170 <p:column headerText="Nodo">
171 <h:outputText value="#{question.node.name}"/>
173 <p:column headerText="Rede Bayesiana">
174 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
178 <p:column headerText="Opções">
180 <h:commandLink action="#{bayesianNetworkController.destroy}" >
181 <h:graphicImage value="/img/bayesianNetwork/remove.png" />
191 <h:commandLink action="/net/question/Create.xhtml" value="Criar nova pergunta"/>
194 <p:panel header="Respostas" toggleable="true">
197 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
200 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
201 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
202 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
203 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
204 rowEditListener="#{answerController.rowEditListener}">
206 <p:column headerText="id">
207 <h:outputText value="#{answer.id}" />
210 <p:column headerText="Texto">
212 <f:facet name="output">
213 <h:outputText value="#{answer.text}" />
215 <f:facet name="input">
216 <p:inputText value="#{answer.text}" style="width:100%"/>
220 <p:column headerText="Probabilidade">
222 <f:facet name="output">
223 <h:outputText value="#{answer.likelihood}" />
225 <f:facet name="input">
226 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
230 <p:column headerText="Pergunta">
231 <h:outputText value="#{answer.question.text}"/>
233 <p:column headerText="Nodo">
234 <h:outputText value="#{answer.question.node.name}"/>
236 <p:column headerText="Rede Bayesiana">
237 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
241 <p:column headerText="Opções">
249 <h:commandLink action="/net/answer/Create.xhtml" value="Criar nova resposta"/>