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>
13 <h:panelGroup id="messagePanel" layout="block">
14 <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
16 <p:tabView id="tabView">
17 <p:tab id="tab1" title="Redes Bayesianas">
19 <p:fileUpload widgetVar="uploader" height="48" width="48"
20 fileUploadListener="#{fileUploadController.handleFileUpload}"
21 image="/img/bn/browse.png" customUI="true"
22 multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
24 <h:outputLink value="#" title="Upload" onclick="uploader.upload();"
25 style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
30 <h:commandLink action="#{bayesianNetworkController.recreateModel}" value="Atualizar tabela"/>
32 <h:panelGrid columns="2" cellpadding="10">
33 <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
34 <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
36 <h:form id="fBayesianNetworkList">
37 <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList"
38 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
39 rowEditListener="#{bayesianNetworkController.rowEditListener}">
40 <p:column headerText="id">
41 <h:outputText value="#{bayesianNetwork.id}"/>
44 <p:column headerText="Nome">
46 <f:facet name="output">
47 <h:outputText value="#{bayesianNetwork.name}"/>
49 <f:facet name="input">
50 <p:inputText value="#{bayesianNetwork.name}"/>
54 <p:column headerText="Opções">
56 <h:commandLink action="#{bayesianNetworkController.destroy}" >
57 <h:graphicImage value="/img/bn/remove.png" />
66 <p:tab id="tab2" title="Nodos">
69 <h:commandLink action="#{nodeController.recreateModel}" value="Atualizar tabela"/>
71 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
72 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
74 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
75 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
76 rowEditListener="#{nodeController.rowEditListener}">
78 <p:column headerText="id">
79 <h:outputText value="#{node.id}" />
81 <p:column headerText="Nome">
83 <f:facet name="output">
84 <h:outputText value="#{node.name}" />
86 <f:facet name="input">
87 <p:inputText value="#{node.name}" style="width:100%"/>
91 <p:column headerText="Tempo">
93 <f:facet name="output">
94 <h:outputText value="#{node.time}" />
96 <f:facet name="input">
97 <p:inputText value="#{node.time}" style="width:100%"/>
101 <p:column headerText="Custo">
103 <f:facet name="output">
104 <h:outputText value="#{node.cost}" />
106 <f:facet name="input">
107 <p:inputText value="#{node.cost}" style="width:100%"/>
111 <p:column headerText="Classificação">
113 <f:facet name="output">
114 <h:outputText value="#{node.nodeType}" />
116 <f:facet name="input">
117 <h:selectOneMenu value="#{node.nodeType}" >
118 <f:selectItems value="#{nodeTypeController.nodeTypes}"
120 itemLabel="#{nodeType}"
121 itemValue="#{nodeType}" />
126 <p:column headerText="Tipo">
128 <f:facet name="output">
129 <h:outputText value="#{node.nodeRole}" />
131 <f:facet name="input">
132 <h:selectOneMenu value="#{node.nodeRole}" >
133 <f:selectItems value="#{nodeRoleController.nodeRoles}"
135 itemLabel="#{nodeRole}"
136 itemValue="#{nodeRole}" />
141 <p:column headerText="Rede Bayesiana">
142 <h:outputText value="#{node.bayesianNetwork.name}"/>
146 <p:column headerText="Opções">
148 <h:commandLink action="#{nodeController.destroy}" >
149 <h:graphicImage value="/img/bn/remove.png" />
157 <h:commandLink action="/bn/node/Create.xhtml" value="Criar novo nodo"/>
161 <p:tab id="tab3" title="Perguntas">
164 <h:commandLink action="#{questionController.recreateModel}" value="Atualizar tabela"/>
167 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
168 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
169 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
170 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
171 rowEditListener="#{questionController.rowEditListener}">
173 <p:column headerText="id">
174 <h:outputText value="#{question.id}" />
177 <p:column headerText="Texto">
179 <f:facet name="output">
180 <h:outputText value="#{question.text}" />
182 <f:facet name="input">
183 <p:inputText value="#{question.text}" style="width:100%"/>
187 <p:column headerText="Nodo">
188 <h:outputText value="#{question.node.name}"/>
190 <p:column headerText="Rede Bayesiana">
191 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
193 <p:column headerText="Opções">
195 <h:commandLink action="#{questionController.destroy}" >
196 <h:graphicImage value="/img/bn/remove.png" />
205 <h:commandLink action="/bn/question/Create.xhtml" value="Criar nova pergunta"/>
209 <p:tab id="tab4" title="Respostas">
212 <h:commandLink action="#{answerController.recreateModel}" value="Atualizar tabela"/>
215 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
216 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
217 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
218 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
219 rowEditListener="#{answerController.rowEditListener}">
221 <p:column headerText="id">
222 <h:outputText value="#{answer.id}" />
225 <p:column headerText="Texto">
227 <f:facet name="output">
228 <h:outputText value="#{answer.text}" />
230 <f:facet name="input">
231 <p:inputText value="#{answer.text}" style="width:100%"/>
235 <p:column headerText="Probabilidade">
237 <f:facet name="output">
238 <h:outputText value="#{answer.likelihood}" />
240 <f:facet name="input">
241 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
245 <p:column headerText="Pergunta">
246 <h:outputText value="#{answer.question.text}"/>
248 <p:column headerText="Nodo">
249 <h:outputText value="#{answer.question.node.name}"/>
251 <p:column headerText="Rede Bayesiana">
252 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
254 <p:column headerText="Opções">
256 <h:commandLink action="#{answerController.destroy}" >
257 <h:graphicImage value="/img/bn/remove.png" />
265 <h:commandLink action="/bn/answer/Create.xhtml" value="Criar nova resposta"/>