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}" />
82 <p:column headerText="Nome">
84 <f:facet name="output">
85 <h:outputText value="#{node.name}" />
87 <f:facet name="input">
88 <p:inputText value="#{node.name}" style="width:100%"/>
92 <p:column headerText="Tempo">
94 <f:facet name="output">
95 <h:outputText value="#{node.time}" />
97 <f:facet name="input">
98 <p:inputText value="#{node.time}" style="width:100%"/>
102 <p:column headerText="Custo">
104 <f:facet name="output">
105 <h:outputText value="#{node.cost}" />
107 <f:facet name="input">
108 <p:inputText value="#{node.cost}" style="width:100%"/>
112 <p:column headerText="Classificação">
114 <f:facet name="output">
115 <h:outputText value="#{node.nodeType}" />
117 <f:facet name="input">
118 <h:selectOneMenu value="#{node.nodeType}" >
119 <f:selectItems value="#{nodeTypeController.nodeTypes}"
121 itemLabel="#{nodeType}"
122 itemValue="#{nodeType}" />
127 <p:column headerText="Tipo">
129 <f:facet name="output">
130 <h:outputText value="#{node.nodeRole}" />
132 <f:facet name="input">
133 <h:selectOneMenu value="#{node.nodeRole}" >
134 <f:selectItems value="#{nodeRoleController.nodeRoles}"
136 itemLabel="#{nodeRole}"
137 itemValue="#{nodeRole}" />
142 <p:column headerText="Rede Bayesiana">
143 <h:outputText value="#{node.bayesianNetwork.name}"/>
147 <p:column headerText="Opções">
149 <h:commandLink action="#{nodeController.destroy}" >
150 <h:graphicImage value="/img/bn/remove.png" />
158 <h:commandLink action="/bn/node/Create.xhtml" value="Criar novo nodo"/>
162 <p:tab id="tab3" title="Perguntas">
165 <h:commandLink action="#{questionController.recreateModel}" value="Atualizar tabela"/>
168 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
169 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
170 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
171 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
172 rowEditListener="#{questionController.rowEditListener}">
174 <p:column headerText="id">
175 <h:outputText value="#{question.id}" />
178 <p:column headerText="Texto">
180 <f:facet name="output">
181 <h:outputText value="#{question.text}" />
183 <f:facet name="input">
184 <p:inputText value="#{question.text}" style="width:100%"/>
188 <p:column headerText="Nodo">
189 <h:outputText value="#{question.node.name}"/>
191 <p:column headerText="Rede Bayesiana">
192 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
194 <p:column headerText="Opções">
196 <h:commandLink action="#{questionController.destroy}" >
197 <h:graphicImage value="/img/bn/remove.png" />
206 <h:commandLink action="/bn/question/Create.xhtml" value="Criar nova pergunta"/>
210 <p:tab id="tab4" title="Respostas">
213 <h:commandLink action="#{answerController.recreateModel}" 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}"/>
255 <p:column headerText="Opções">
257 <h:commandLink action="#{answerController.destroy}" >
258 <h:graphicImage value="/img/bn/remove.png" />
266 <h:commandLink action="/bn/answer/Create.xhtml" value="Criar nova resposta"/>