From aef8b42f18f252cddd14ef93b9d4bf697584b4aa Mon Sep 17 00:00:00 2001
From: Falucho <german.faller@pcunix71.fing.edu.uy>
Date: Sat, 22 Jun 2019 17:09:59 -0300
Subject: [PATCH] Se hace deploy con JSF 2.3

---
 .../java/uy/edu/fing/tse/jsf/RequestBean.java |  3 --
 .../webapp/WEB-INF/templates/template.xhtml   | 21 +++++++++++
 backoffice/src/main/webapp/index.html         | 36 -------------------
 backoffice/src/main/webapp/index.xhtml        |  7 ++++
 central-ear/pom.xml                           |  5 +++
 pom.xml                                       |  7 ++++
 6 files changed, 40 insertions(+), 39 deletions(-)
 create mode 100644 backoffice/src/main/webapp/WEB-INF/templates/template.xhtml
 delete mode 100644 backoffice/src/main/webapp/index.html
 create mode 100644 backoffice/src/main/webapp/index.xhtml

diff --git a/backoffice/src/main/java/uy/edu/fing/tse/jsf/RequestBean.java b/backoffice/src/main/java/uy/edu/fing/tse/jsf/RequestBean.java
index 172e08d..ad64d9f 100644
--- a/backoffice/src/main/java/uy/edu/fing/tse/jsf/RequestBean.java
+++ b/backoffice/src/main/java/uy/edu/fing/tse/jsf/RequestBean.java
@@ -6,7 +6,6 @@ import uy.edu.fing.tse.central.business.BusinessLocal;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Named;
-import javax.jms.MessageProducer;
 
 @Named
 @RequestScoped
@@ -15,7 +14,5 @@ public class RequestBean {
     @EJB
     private BusinessLocal negocio;
 
-    @EJB
-    private MessageProducer mq;
 
 }
diff --git a/backoffice/src/main/webapp/WEB-INF/templates/template.xhtml b/backoffice/src/main/webapp/WEB-INF/templates/template.xhtml
new file mode 100644
index 0000000..6a23d21
--- /dev/null
+++ b/backoffice/src/main/webapp/WEB-INF/templates/template.xhtml
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<head>
+    <title>BackOffice - feiknius</title>
+</head>
+<body>
+<header>
+
+</header>
+<!-- Menús, headers y todo lo que vaya antes del contenido -->
+<ui:insert name="contenido">
+    Contenido por defecto para que no quede en blanco...
+</ui:insert>
+<!-- Footer y otros componentes que vayan después del contenido -->
+<footer>
+
+</footer>
+</body>
+</html>
\ No newline at end of file
diff --git a/backoffice/src/main/webapp/index.html b/backoffice/src/main/webapp/index.html
deleted file mode 100644
index a5c3ccc..0000000
--- a/backoffice/src/main/webapp/index.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>TSE 2019 - Práctico</title>
-</head>
-<body>
-
-<h1>TSE 2019 - Practico</h1>
-<br>
-<h3>
-    <a href="jsp">JSP</a>
-</h3>
-<br>
-
-<h3>
-    <a href="jsf">JSF</a>
-</h3>
-<br>
-
-<h3>
-    <a href="../practico-api/rest/noticias">Rest</a>
-</h3>
-<br>
-
-<h3>
-    <a href="../practico-api/SoapAPI?wsdl">SOAP</a>
-</h3>
-<br>
-
-<h3>
-    <a href="resources/soapui/TSE-API-soapui-project.xml" download>SoapUI</a>
-</h3>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/backoffice/src/main/webapp/index.xhtml b/backoffice/src/main/webapp/index.xhtml
new file mode 100644
index 0000000..5856e54
--- /dev/null
+++ b/backoffice/src/main/webapp/index.xhtml
@@ -0,0 +1,7 @@
+<ui:decorate xmlns="http://www.w3.org/1999/xhtml"
+             xmlns:ui="http://java.sun.com/jsf/facelets" template="WEB-INF/templates/template.xhtml">
+    <ui:define name="contenido">
+        <h1>Contenido que inserta el cliente en el template.</h1>
+        <h1>FALLER</h1>
+    </ui:define>
+</ui:decorate>
\ No newline at end of file
diff --git a/central-ear/pom.xml b/central-ear/pom.xml
index b650d6c..95748ef 100644
--- a/central-ear/pom.xml
+++ b/central-ear/pom.xml
@@ -33,6 +33,11 @@
             <type>ejb</type>
         </dependency>
 
+        <dependency>
+            <groupId>uy.edu.fing.tse</groupId>
+            <artifactId>backoffice</artifactId>
+            <type>war</type>
+        </dependency>
 
     </dependencies>
 
diff --git a/pom.xml b/pom.xml
index ab3e010..09df15d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,6 +57,13 @@
                 <type>ejb</type>
             </dependency>
 
+            <dependency>
+                <groupId>uy.edu.fing.tse</groupId>
+                <artifactId>backoffice</artifactId>
+                <version>${project.version}</version>
+                <type>war</type>
+            </dependency>
+
             <dependency>
                 <groupId>org.wildfly.bom</groupId>
                 <artifactId>wildfly-javaee8-with-tools</artifactId>
-- 
GitLab