diff --git a/1.sources/MyHealth/.classpath b/1.sources/MyHealth/.classpath index 6177316..bce4f8e 100644 --- a/1.sources/MyHealth/.classpath +++ b/1.sources/MyHealth/.classpath @@ -4,4 +4,5 @@ + diff --git a/1.sources/MyHealth/build.xml b/1.sources/MyHealth/build.xml index 1720166..8281484 100644 --- a/1.sources/MyHealth/build.xml +++ b/1.sources/MyHealth/build.xml @@ -1,6 +1,6 @@ - PDS MyHealth + MyHealth diff --git a/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml b/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml index 4f1a7f5..4ebfd2c 100644 --- a/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml +++ b/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml @@ -1,3 +1,5 @@ + + /login.xhtml - admin - /admin.xhtml + home + /home.xhtml - + + + \ No newline at end of file diff --git a/1.sources/MyHealth/docroot/WEB-INF/lib/primefaces-7.0.jar b/1.sources/MyHealth/docroot/WEB-INF/lib/primefaces-7.0.jar new file mode 100644 index 0000000..d067069 Binary files /dev/null and b/1.sources/MyHealth/docroot/WEB-INF/lib/primefaces-7.0.jar differ diff --git a/1.sources/MyHealth/docroot/WEB-INF/web.xml b/1.sources/MyHealth/docroot/WEB-INF/web.xml index 0796bbf..1d71ea4 100644 --- a/1.sources/MyHealth/docroot/WEB-INF/web.xml +++ b/1.sources/MyHealth/docroot/WEB-INF/web.xml @@ -30,14 +30,18 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" *.xhtml + + 404 + /error.xhtml + 500 - ErrowView.xhtml + /error.xhtml - HomeView.xhtml + home.xhtml diff --git a/1.sources/MyHealth/docroot/header.xhtml b/1.sources/MyHealth/docroot/header.xhtml index 8ad53eb..7f7c8b7 100644 --- a/1.sources/MyHealth/docroot/header.xhtml +++ b/1.sources/MyHealth/docroot/header.xhtml @@ -4,7 +4,8 @@ + xmlns:h="http://java.sun.com/jsf/html" + xmlns:p="http://primefaces.org/ui"> @@ -15,12 +16,14 @@
-

myHealth page header

+

myHealth Site


diff --git a/1.sources/MyHealth/docroot/home.xhtml b/1.sources/MyHealth/docroot/home.xhtml index f66c7a2..0633d02 100644 --- a/1.sources/MyHealth/docroot/home.xhtml +++ b/1.sources/MyHealth/docroot/home.xhtml @@ -1,23 +1,36 @@ - - - - - + + + + + - -
-
- + + + + + + + + + +
+
+ +
+
+ +
Welcome #{home.userName} +
-

- -
- + \ No newline at end of file diff --git a/1.sources/MyHealth/docroot/login.xhtml b/1.sources/MyHealth/docroot/login.xhtml index 06419e8..558b90c 100644 --- a/1.sources/MyHealth/docroot/login.xhtml +++ b/1.sources/MyHealth/docroot/login.xhtml @@ -1,15 +1,20 @@ - + + login -

myHealth login page

+

myHealth login

+ diff --git a/1.sources/MyHealth/docroot/medicaltest/testView.xhtml b/1.sources/MyHealth/docroot/medicaltest/testView.xhtml index 7d9aee8..6c6738c 100644 --- a/1.sources/MyHealth/docroot/medicaltest/testView.xhtml +++ b/1.sources/MyHealth/docroot/medicaltest/testView.xhtml @@ -16,7 +16,7 @@

- +

diff --git a/1.sources/MyHealth/docroot/profile/testView_1.xhtml b/1.sources/MyHealth/docroot/profile/testView_1.xhtml deleted file mode 100644 index 7d9aee8..0000000 --- a/1.sources/MyHealth/docroot/profile/testView_1.xhtml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - -
-

test Page

-
-
TestPage:
-
- test page content -
-
-

- -

-
-
-
- diff --git a/1.sources/MyHealth/docroot/systemAdmin/testView_2.xhtml b/1.sources/MyHealth/docroot/systemAdmin/testView_2.xhtml index 7d9aee8..6c6738c 100644 --- a/1.sources/MyHealth/docroot/systemAdmin/testView_2.xhtml +++ b/1.sources/MyHealth/docroot/systemAdmin/testView_2.xhtml @@ -16,7 +16,7 @@

- +

diff --git a/1.sources/MyHealth/src/common/ApplicationConfig.java b/1.sources/MyHealth/src/common/ApplicationConfig.java new file mode 100644 index 0000000..b9a26b1 --- /dev/null +++ b/1.sources/MyHealth/src/common/ApplicationConfig.java @@ -0,0 +1,10 @@ +package common; + +import javax.enterprise.context.ApplicationScoped; +import javax.faces.annotation.FacesConfig; + +@FacesConfig +@ApplicationScoped +public class ApplicationConfig { + +} diff --git a/1.sources/MyHealth/src/common/homeMBean.java b/1.sources/MyHealth/src/common/homeMBean.java new file mode 100644 index 0000000..e34e171 --- /dev/null +++ b/1.sources/MyHealth/src/common/homeMBean.java @@ -0,0 +1,28 @@ +package common; + +import java.io.Serializable; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; + +/*** + * + * @author Marcos García Núñez (mgarcianun@uoc.edu) + * + */ +@SuppressWarnings("deprecation") +@ManagedBean(name = "home") +@SessionScoped +public class homeMBean implements Serializable { + + private static final long serialVersionUID = 1L; + + public String getUserName() { + return SessionUtils.getSession().getAttribute("username").toString(); + } + + public String getUserId() { + return (String) SessionUtils.getSession().getAttribute("userid"); + } + +} diff --git a/1.sources/MyHealth/src/managedbean/profile/ProfileMBeanBase.java b/1.sources/MyHealth/src/managedbean/profile/ProfileMBeanBase.java new file mode 100644 index 0000000..3c65043 --- /dev/null +++ b/1.sources/MyHealth/src/managedbean/profile/ProfileMBeanBase.java @@ -0,0 +1,21 @@ +package managedbean.profile; + +import java.util.Properties; + +import javax.ejb.EJB; +import javax.naming.Context; +import javax.naming.InitialContext; + +import ejb.profile.ProfileFacadeRemote; + +public class ProfileMBeanBase { + @EJB + protected ProfileFacadeRemote remoteManager; + + protected void initializeProfileFacadeRemote() throws Exception { + Properties props = System.getProperties(); + Context ctx = new InitialContext(props); + remoteManager = (ProfileFacadeRemote) ctx.lookup("java:app/MyHealth.jar/ProfileFacadeBean!ejb.profile.ProfileFacadeRemote"); + } + +} diff --git a/2.database/.project b/2.database/.project new file mode 100644 index 0000000..4add3fc --- /dev/null +++ b/2.database/.project @@ -0,0 +1,11 @@ + + + 2.database + + + + + + + +