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>
15 <p:fileUpload widgetVar="uploader" height="48" width="48"
16 fileUploadListener="#{fileUploadController.handleFileUpload}"
17 image="/img/bn/browse.png" customUI="true"
18 multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
19 update="bayesianNetworkList, nodeList"/>
20 <h:outputLink value="#" title="Upload" onclick="uploader.upload();"
21 style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
25 <h:panelGroup id="messagePanel" layout="block">
26 <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
28 <p:panel header="Redes Bayesianas" toggleable="true" toggleListener="#{bayesianNetworkController.prepareList}">
31 <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
33 <h:panelGrid columns="2" cellpadding="10">
34 <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
35 <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
37 <h:form id="fBayesianNetworkList">
39 <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList"
40 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
41 rowEditListener="#{bayesianNetworkController.rowEditListener}">
42 <p:column headerText="id">
43 <h:outputText value="#{bayesianNetwork.id}"/>
46 <p:column headerText="Nome">
48 <f:facet name="output">
49 <h:outputText value="#{bayesianNetwork.name}"/>
51 <f:facet name="input">
52 <p:inputText value="#{bayesianNetwork.name}"/>
56 <p:column headerText="Opções">
58 <h:commandLink action="#{bayesianNetworkController.destroy}" >
59 <h:graphicImage value="/img/bn/remove.png" />
68 <p:panel header="Nodos" toggleable="true">
71 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
73 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
74 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
76 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
77 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
78 rowEditListener="#{nodeController.rowEditListener}">
80 <p:column headerText="id">
81 <h:outputText value="#{node.id}" />
84 <p:column headerText="Nome">
86 <f:facet name="output">
87 <h:outputText value="#{node.name}" />
89 <f:facet name="input">
90 <p:inputText value="#{node.name}" style="width:100%"/>
94 <p:column headerText="Tempo">
96 <f:facet name="output">
97 <h:outputText value="#{node.time}" />
99 <f:facet name="input">
100 <p:inputText value="#{node.time}" style="width:100%"/>
104 <p:column headerText="Custo">
106 <f:facet name="output">
107 <h:outputText value="#{node.cost}" />
109 <f:facet name="input">
110 <p:inputText value="#{node.cost}" style="width:100%"/>
114 <p:column headerText="Tipo">
116 <f:facet name="output">
117 <h:outputText value="#{node.nodeType}" />
119 <f:facet name="input">
120 <h:selectOneMenu value="#{node.nodeType}" >
121 <f:selectItems value="#{nodeTypeController.nodeTypes}"
123 itemLabel="#{nodeType}"
124 itemValue="#{nodeType}" />
129 <p:column headerText="Rede Bayesiana">
130 <h:outputText value="#{node.bayesianNetwork.name}"/>
134 <p:column headerText="Opções">
143 <p:panel header="Perguntas" toggleable="true">
146 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
149 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
150 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
151 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
152 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
153 rowEditListener="#{questionController.rowEditListener}">
155 <p:column headerText="id">
156 <h:outputText value="#{question.id}" />
159 <p:column headerText="Texto">
161 <f:facet name="output">
162 <h:outputText value="#{question.text}" />
164 <f:facet name="input">
165 <p:inputText value="#{question.text}" style="width:100%"/>
169 <p:column headerText="Nodo">
170 <h:outputText value="#{question.node.name}"/>
172 <p:column headerText="Rede Bayesiana">
173 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
177 <p:column headerText="Opções">
179 <h:commandLink action="#{bayesianNetworkController.destroy}" >
180 <h:graphicImage value="/img/bn/remove.png" />
190 <h:commandLink action="/net/question/Create.xhtml" value="Criar nova pergunta"/>
193 <p:panel header="Respostas" toggleable="true">
196 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
199 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
200 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
201 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
202 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
203 rowEditListener="#{answerController.rowEditListener}">
205 <p:column headerText="id">
206 <h:outputText value="#{answer.id}" />
209 <p:column headerText="Texto">
211 <f:facet name="output">
212 <h:outputText value="#{answer.text}" />
214 <f:facet name="input">
215 <p:inputText value="#{answer.text}" style="width:100%"/>
219 <p:column headerText="Probabilidade">
221 <f:facet name="output">
222 <h:outputText value="#{answer.likelihood}" />
224 <f:facet name="input">
225 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
229 <p:column headerText="Pergunta">
230 <h:outputText value="#{answer.question.text}"/>
232 <p:column headerText="Nodo">
233 <h:outputText value="#{answer.question.node.name}"/>
235 <p:column headerText="Rede Bayesiana">
236 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
240 <p:column headerText="Opções">
248 <h:commandLink action="/net/answer/Create.xhtml" value="Criar nova resposta"/>