Added UI (JSF) and JPA to bayesian network entities.
[simdecs.git] / web / bn / bayesianNetwork / List.xhtml
diff --git a/web/bn/bayesianNetwork/List.xhtml b/web/bn/bayesianNetwork/List.xhtml
new file mode 100644 (file)
index 0000000..8d00def
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+    <ui:composition template="/template.xhtml">
+        <ui:define name="title">
+            <h:outputText value="#{bundle.ListBayesianNetworkTitle}"></h:outputText>
+        </ui:define>
+        <ui:define name="body">
+            <h:form styleClass="jsfcrud_list_form">
+                <h:panelGroup id="messagePanel" layout="block">
+                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+                </h:panelGroup>
+                <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
+                <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
+                    <h:outputText value="#{bayesianNetworkController.pagination.pageFirstItem + 1}..#{bayesianNetworkController.pagination.pageLastItem + 1}/#{bayesianNetworkController.pagination.itemsCount}"/>&nbsp;
+                    <h:commandLink action="#{bayesianNetworkController.previous}" value="#{bundle.Previous} #{bayesianNetworkController.pagination.pageSize}" rendered="#{bayesianNetworkController.pagination.hasPreviousPage}"/>&nbsp;
+                    <h:commandLink action="#{bayesianNetworkController.next}" value="#{bundle.Next} #{bayesianNetworkController.pagination.pageSize}" rendered="#{bayesianNetworkController.pagination.hasNextPage}"/>&nbsp;
+                    <h:dataTable value="#{bayesianNetworkController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
+                        <h:column>
+                            <f:facet name="header">
+                                <h:outputText value="#{bundle.ListBayesianNetworkTitle_id}"/>
+                            </f:facet>
+                            <h:outputText value="#{item.id}"/>
+                        </h:column>
+                        <h:column>
+                            <f:facet name="header">
+                                <h:outputText value="#{bundle.ListBayesianNetworkTitle_name}"/>
+                            </f:facet>
+                            <h:outputText value="#{item.name}"/>
+                        </h:column>
+                        <h:column>
+                            <f:facet name="header">
+                                <h:outputText value="&nbsp;"/>
+                            </f:facet>
+                            <h:commandLink action="#{bayesianNetworkController.prepareView}" value="#{bundle.ListBayesianNetworkViewLink}"/>
+                            <h:outputText value=" "/>
+                            <h:commandLink action="#{bayesianNetworkController.prepareEdit}" value="#{bundle.ListBayesianNetworkEditLink}"/>
+                            <h:outputText value=" "/>
+                            <h:commandLink action="#{bayesianNetworkController.destroy}" value="#{bundle.ListBayesianNetworkDestroyLink}"/>
+                        </h:column>
+                    </h:dataTable>
+                </h:panelGroup>
+                <br />
+                <h:commandLink action="#{bayesianNetworkController.prepareCreate}" value="#{bundle.ListBayesianNetworkCreateLink}"/>
+                <br />
+                <br />
+                <h:commandLink value="#{bundle.ListBayesianNetworkIndexLink}" action="/index" immediate="true" />
+            </h:form>
+        </ui:define>
+    </ui:composition>
+
+</html>