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"
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:tabView id="tabView">
30 <p:tab id="tab1" title="Redes Bayesianas">
33 <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
35 <h:panelGrid columns="2" cellpadding="10">
36 <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
37 <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
39 <h:form id="fBayesianNetworkList">
41 <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList"
42 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
43 rowEditListener="#{bayesianNetworkController.rowEditListener}">
44 <p:column headerText="id">
45 <h:outputText value="#{bayesianNetwork.id}"/>
48 <p:column headerText="Nome">
50 <f:facet name="output">
51 <h:outputText value="#{bayesianNetwork.name}"/>
53 <f:facet name="input">
54 <p:inputText value="#{bayesianNetwork.name}"/>
58 <p:column headerText="Opções">
60 <h:commandLink action="#{bayesianNetworkController.destroy}" >
61 <h:graphicImage value="/img/bn/remove.png" />
71 <p:tab id="tab2" title="Nodos">
74 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
76 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
77 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
79 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
80 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
81 rowEditListener="#{nodeController.rowEditListener}">
83 <p:column headerText="id">
84 <h:outputText value="#{node.id}" />
87 <p:column headerText="Nome">
89 <f:facet name="output">
90 <h:outputText value="#{node.name}" />
92 <f:facet name="input">
93 <p:inputText value="#{node.name}" style="width:100%"/>
97 <p:column headerText="Tempo">
99 <f:facet name="output">
100 <h:outputText value="#{node.time}" />
102 <f:facet name="input">
103 <p:inputText value="#{node.time}" style="width:100%"/>
107 <p:column headerText="Custo">
109 <f:facet name="output">
110 <h:outputText value="#{node.cost}" />
112 <f:facet name="input">
113 <p:inputText value="#{node.cost}" style="width:100%"/>
117 <p:column headerText="Classificação">
119 <f:facet name="output">
120 <h:outputText value="#{node.nodeType}" />
122 <f:facet name="input">
123 <h:selectOneMenu value="#{node.nodeType}" >
124 <f:selectItems value="#{nodeTypeController.nodeTypes}"
126 itemLabel="#{nodeType}"
127 itemValue="#{nodeType}" />
132 <p:column headerText="Tipo">
134 <f:facet name="output">
135 <h:outputText value="#{node.nodeRole}" />
137 <f:facet name="input">
138 <h:selectOneMenu value="#{node.nodeRole}" >
139 <f:selectItems value="#{nodeRoleController.nodeRoles}"
141 itemLabel="#{nodeRole}"
142 itemValue="#{nodeRole}" />
147 <p:column headerText="Rede Bayesiana">
148 <h:outputText value="#{node.bayesianNetwork.name}"/>
152 <p:column headerText="Opções">
161 <h:commandLink action="/bn/node/Create.xhtml" value="Criar novo nodo"/>
165 <p:tab id="tab3" title="Perguntas">
168 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
171 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
172 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
173 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
174 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
175 rowEditListener="#{questionController.rowEditListener}">
177 <p:column headerText="id">
178 <h:outputText value="#{question.id}" />
181 <p:column headerText="Texto">
183 <f:facet name="output">
184 <h:outputText value="#{question.text}" />
186 <f:facet name="input">
187 <p:inputText value="#{question.text}" style="width:100%"/>
191 <p:column headerText="Nodo">
192 <h:outputText value="#{question.node.name}"/>
194 <p:column headerText="Rede Bayesiana">
195 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
199 <p:column headerText="Opções">
201 <h:commandLink action="#{bayesianNetworkController.destroy}" >
202 <h:graphicImage value="/img/bn/remove.png" />
212 <h:commandLink action="/bn/question/Create.xhtml" value="Criar nova pergunta"/>
215 <p:tab id="tab4" title="Respostas">
218 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
221 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
222 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
223 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
224 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
225 rowEditListener="#{answerController.rowEditListener}">
227 <p:column headerText="id">
228 <h:outputText value="#{answer.id}" />
231 <p:column headerText="Texto">
233 <f:facet name="output">
234 <h:outputText value="#{answer.text}" />
236 <f:facet name="input">
237 <p:inputText value="#{answer.text}" style="width:100%"/>
241 <p:column headerText="Probabilidade">
243 <f:facet name="output">
244 <h:outputText value="#{answer.likelihood}" />
246 <f:facet name="input">
247 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
251 <p:column headerText="Pergunta">
252 <h:outputText value="#{answer.question.text}"/>
254 <p:column headerText="Nodo">
255 <h:outputText value="#{answer.question.node.name}"/>
257 <p:column headerText="Rede Bayesiana">
258 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
262 <p:column headerText="Opções">
270 <h:commandLink action="/bn/answer/Create.xhtml" value="Criar nova resposta"/>