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"
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/bn/remove.png" />
70 <p:panel header="Nodos" toggleable="true" collapsed="true">
73 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
75 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
76 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
78 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
79 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
80 rowEditListener="#{nodeController.rowEditListener}">
82 <p:column headerText="id">
83 <h:outputText value="#{node.id}" />
86 <p:column headerText="Nome">
88 <f:facet name="output">
89 <h:outputText value="#{node.name}" />
91 <f:facet name="input">
92 <p:inputText value="#{node.name}" style="width:100%"/>
96 <p:column headerText="Tempo">
98 <f:facet name="output">
99 <h:outputText value="#{node.time}" />
101 <f:facet name="input">
102 <p:inputText value="#{node.time}" style="width:100%"/>
106 <p:column headerText="Custo">
108 <f:facet name="output">
109 <h:outputText value="#{node.cost}" />
111 <f:facet name="input">
112 <p:inputText value="#{node.cost}" style="width:100%"/>
116 <p:column headerText="Classificação">
118 <f:facet name="output">
119 <h:outputText value="#{node.nodeType}" />
121 <f:facet name="input">
122 <h:selectOneMenu value="#{node.nodeType}" >
123 <f:selectItems value="#{nodeTypeController.nodeTypes}"
125 itemLabel="#{nodeType}"
126 itemValue="#{nodeType}" />
131 <p:column headerText="Tipo">
133 <f:facet name="output">
134 <h:outputText value="#{node.nodeRole}" />
136 <f:facet name="input">
137 <h:selectOneMenu value="#{node.nodeRole}" >
138 <f:selectItems value="#{nodeRoleController.nodeRoles}"
140 itemLabel="#{nodeRole}"
141 itemValue="#{nodeRole}" />
146 <p:column headerText="Rede Bayesiana">
147 <h:outputText value="#{node.bayesianNetwork.name}"/>
151 <p:column headerText="Opções">
160 <p:panel header="Perguntas" toggleable="true" collapsed="true">
163 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
166 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
167 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
168 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
169 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
170 rowEditListener="#{questionController.rowEditListener}">
172 <p:column headerText="id">
173 <h:outputText value="#{question.id}" />
176 <p:column headerText="Texto">
178 <f:facet name="output">
179 <h:outputText value="#{question.text}" />
181 <f:facet name="input">
182 <p:inputText value="#{question.text}" style="width:100%"/>
186 <p:column headerText="Nodo">
187 <h:outputText value="#{question.node.name}"/>
189 <p:column headerText="Rede Bayesiana">
190 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
194 <p:column headerText="Opções">
196 <h:commandLink action="#{bayesianNetworkController.destroy}" >
197 <h:graphicImage value="/img/bn/remove.png" />
207 <h:commandLink action="/net/question/Create.xhtml" value="Criar nova pergunta"/>
210 <p:panel header="Respostas" toggleable="true" collapsed="true">
213 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
216 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
217 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
218 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
219 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
220 rowEditListener="#{answerController.rowEditListener}">
222 <p:column headerText="id">
223 <h:outputText value="#{answer.id}" />
226 <p:column headerText="Texto">
228 <f:facet name="output">
229 <h:outputText value="#{answer.text}" />
231 <f:facet name="input">
232 <p:inputText value="#{answer.text}" style="width:100%"/>
236 <p:column headerText="Probabilidade">
238 <f:facet name="output">
239 <h:outputText value="#{answer.likelihood}" />
241 <f:facet name="input">
242 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
246 <p:column headerText="Pergunta">
247 <h:outputText value="#{answer.question.text}"/>
249 <p:column headerText="Nodo">
250 <h:outputText value="#{answer.question.node.name}"/>
252 <p:column headerText="Rede Bayesiana">
253 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
257 <p:column headerText="Opções">
265 <h:commandLink action="/net/answer/Create.xhtml" value="Criar nova resposta"/>