* Implementado esqueleto de menu principal.
* Filtro AuthorizationFilter para gestionar inicio de sesión. * Interfaz para página de login básica. * Todos los managed beans movidos a paquete managedbean * Configuración básica de faces-config con navegación de paginas outcome. * Actualizado web.xml * Utilización de librería primefaces para interfaz de usuario. * Aplicado tema bootstrap para primefaces. * Los iconos (glyph-icons) de primefaces no se cargan en la interfaz (Pendiente de investigar). * Actualización de projects archives para inclusión de clases nuevas en JAR/WAR/EAR de forma correcta.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -1,17 +1,67 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<faces-config version="2.0"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd" version="2.3">
|
||||
|
||||
<navigation-rule>
|
||||
<from-view-id>/login.xhtml</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>home</from-outcome>
|
||||
<to-view-id>/home.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>AddPatient</from-outcome>
|
||||
<to-view-id>/profile/AddPatient.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>AddFamilyDoctor</from-outcome>
|
||||
<to-view-id>/profile/AddFamilyDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>AddSpecialistDoctor</from-outcome>
|
||||
<to-view-id>/profile/AddSpecialistDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>ChangeFamilyDoctor</from-outcome>
|
||||
<to-view-id>/profile/ChangeFamilyDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>ShowPatient</from-outcome>
|
||||
<to-view-id>/profile/ShowPatient.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>ShowFamilyDoctor</from-outcome>
|
||||
<to-view-id>/profile/ShowFamilyDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>ShowSpecialistDoctor</from-outcome>
|
||||
<to-view-id>/profile/ShowSpecialistDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>UpdateSpecialistDoctor</from-outcome>
|
||||
<to-view-id>/profile/UpdateSpecialistDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>UpdateFamilyDoctor</from-outcome>
|
||||
<to-view-id>/profile/UpdateFamilyDoctor.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>UpdatePatient</from-outcome>
|
||||
<to-view-id>/profile/UpdatePatient.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>changecap</from-outcome>
|
||||
<to-view-id>/profile/ChangePrimaryHealthCareCenter.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>MedicalTests</from-outcome>
|
||||
<to-view-id>/medicaltest/MedicalTests.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>VisitView</from-outcome>
|
||||
<to-view-id>/visit/VisitView.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>ManageSpecialties</from-outcome>
|
||||
<to-view-id>/systemAdmin/ManageSpecialties.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
|
||||
</faces-config>
|
||||
BIN
1.sources/MyHealth/docroot/WEB-INF/lib/bootstrap-1.0.10.jar
Normal file
BIN
1.sources/MyHealth/docroot/WEB-INF/lib/bootstrap-1.0.10.jar
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
id="WebApp_ID" version="2.5">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
|
||||
|
||||
|
||||
<context-param>
|
||||
<description>
|
||||
@@ -19,29 +19,101 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
||||
<param-value>.xhtml</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>primefaces.THEME</param-name>
|
||||
<param-value>bootstrap</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- JSF mapping -->
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<!-- Map these files with JSF -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.faces</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.xhtml</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<error-page>
|
||||
<error-code>404</error-code>
|
||||
<location>/error.xhtml</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<error-code>500</error-code>
|
||||
<location>/error.xhtml</location>
|
||||
</error-page>
|
||||
<!-- <error-page> -->
|
||||
<!-- <error-code>404</error-code> -->
|
||||
<!-- <location>/error.xhtml</location> -->
|
||||
<!-- </error-page> -->
|
||||
<!-- <error-page> -->
|
||||
<!-- <error-code>500</error-code> -->
|
||||
<!-- <location>/error.xhtml</location> -->
|
||||
<!-- </error-page> -->
|
||||
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout>
|
||||
|
||||
</session-config>
|
||||
|
||||
<!-- The Welcome File List -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>home.xhtml</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<mime-mapping>
|
||||
<extension>ttf</extension>
|
||||
<mime-type>application/font-sfnt</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>woff</extension>
|
||||
<mime-type>application/font-woff</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>woff2</extension>
|
||||
<mime-type>application/font-woff2</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>eot</extension>
|
||||
<mime-type>application/vnd.ms-fontobject</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>eot?#iefix</extension>
|
||||
<mime-type>application/vnd.ms-fontobject</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg#latobold</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg#latoblack</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg#latolight</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg#latoregular</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
<mime-mapping>
|
||||
<extension>svg#fontawesomeregular</extension>
|
||||
<mime-type>image/svg+xml</mime-type>
|
||||
</mime-mapping>
|
||||
</web-app>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="MedicalSpecialitiesListView?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -1,35 +1,103 @@
|
||||
<?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:f="http://java.sun.com/jsf/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
|
||||
<h:head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>myHealth page header</title>
|
||||
<title>MyHealth Online Services</title>
|
||||
<h:outputStylesheet library="css" name="estilos.css" />
|
||||
</h:head>
|
||||
|
||||
<h:outputScript>
|
||||
function handleLoginRequest(xhr, status, args) {
|
||||
if(args.validationFailed || !args.loggedIn) {
|
||||
PF('dlgLogin').jq.effect("shake", {times:5}, 100);
|
||||
}
|
||||
else {
|
||||
PF('dlgLogin').hide();
|
||||
$('#loginLink').fadeOut();
|
||||
}
|
||||
}
|
||||
</h:outputScript>
|
||||
<h:body>
|
||||
<div id="layout">
|
||||
<div id="top" class="top">
|
||||
<h1 class="Titulo">myHealth Site</h1>
|
||||
</div>
|
||||
<hr />
|
||||
<div id="menucontainer" class="estilomenu">
|
||||
<p:spinner></p:spinner>
|
||||
|
||||
<div id="menuDiv">
|
||||
<h:form>
|
||||
<p>Welcome #{login.userName}, <h:commandLink action="#{login.logout}" value="Logout">Logout</h:commandLink></p>
|
||||
<p:growl id="messages" sticky="true" showDetail="true" life="3000" />
|
||||
<p:menubar>
|
||||
<p:menuitem label="Home" icon="pi pi-home" outcome="home" />
|
||||
<p:submenu label="Administración del sistema" icon="pi pi-briefcase">
|
||||
<p:menuitem value="Gestionar especialidades" icon="pi pi-briefcase" action="#{menuView.goManageSpecialties}" />
|
||||
<p:menuitem value="Gestionar CAPs" action="#{menuView.goManageSpecialties}" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Consultar medicos de familia por CAP" icon="pi pi-search" action="#{menuView.goManageSpecialties}" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Nuevo administrador" icon="pi pi-user" action="#{menuView.goManageSpecialties}" />
|
||||
</p:submenu>
|
||||
<p:submenu label="Visitas" icon="pi pi-calendar">
|
||||
<p:menuitem value="Programar visita" icon="pi pi-briefcase" action="#{menuView.goVisit}" />
|
||||
<p:menuitem value="Ver visitas programadas" icon="pi pi-briefcase" action="#{menuView.goVisit}" />
|
||||
</p:submenu>
|
||||
<p:submenu label="Pruebas médicas" icon="pi pi-clone">
|
||||
<p:menuitem value="Gestionar pruebas médicas" icon="pi pi-briefcase" action="#{menuView.goMedicalTests}" />
|
||||
<p:menuitem value="Consultar médicos especialistas por especialidad" action="#{menuView.goMedicalTests}" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Listar medicos especialistas por especialidad" icon="pi pi-search" action="#{menuView.goMedicalTests}" />
|
||||
</p:submenu>
|
||||
<p:submenu label="Preguntas" icon="pi pi-clone">
|
||||
<p:menuitem value="Añadir pregunta" action="#{menuView.goMedicalTests}" />
|
||||
<p:menuitem value="Responder prguntas pendientes" icon="pi pi-search" action="#{menuView.goMedicalTests}" />
|
||||
</p:submenu>
|
||||
<p:submenu label="Perfil" icon="pi pi-id-card">
|
||||
<p:menuitem value="Nuevo paciente" icon="pi pi-briefcase" outcome="AddPatient" />
|
||||
<p:menuitem value="Nuevo médico de familia" outcome="AddFamilyDoctor" />
|
||||
<p:menuitem value="Nuevo médico especialista" outcome="AddSpecialistDoctor" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Actualizar mi perfil" icon="pi pi-search" action="#{menuView.goUpdateProfile}" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Cambiar médico de familia" icon="pi pi-search" outcome="ChangeFamilyDoctor" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Cambiar de CAP" icon="pi pi-search" outcome="changecap" />
|
||||
</p:submenu>
|
||||
|
||||
<f:facet name="options">
|
||||
<ui:fragment rendered="#{home.logedIn}">
|
||||
<h:outputText value="hola, #{home.userName} " />
|
||||
<p:commandButton type="button" value="Logout" icon="pi pi-user" action="#{loginView.logout}" />
|
||||
</ui:fragment>
|
||||
<ui:fragment rendered="#{not home.logedIn}">
|
||||
<h:outputText value="hola, invitado " />
|
||||
<p:commandButton type="button" value="login" icon="pi pi-user" onclick="PF('dlgLogin').show();" title="login" />
|
||||
|
||||
<p:dialog header="Acceder al sistema" widgetVar="dlgLogin" resizable="false">
|
||||
<h:panelGrid columns="2" cellpadding="5">
|
||||
<h:outputLabel for="username" value="Username:" />
|
||||
<p:inputText id="username" value="#{loginView.username}" required="true" label="username" />
|
||||
|
||||
<h:outputLabel for="password" value="Password:" />
|
||||
<p:password id="password" value="#{loginView.password}" required="true" label="password" />
|
||||
|
||||
<f:facet name="footer">
|
||||
<p:commandButton value="Login" update="messages" action="#{loginView.login}" oncomplete="handleLoginRequest(xhr, status, args)" />
|
||||
<i class="pi pi-spin pi-spinner" style="font-size: 3em"></i>
|
||||
</f:facet>
|
||||
</h:panelGrid>
|
||||
</p:dialog>
|
||||
</ui:fragment>
|
||||
</f:facet>
|
||||
</p:menubar>
|
||||
|
||||
|
||||
</h:form>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ui:insert name="content">Content</ui:insert>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
</h:body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?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:f="http://java.sun.com/jsf/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
<f:metadata>
|
||||
<f:viewParam name="refresh" value="#{specs.refresh}" />
|
||||
@@ -13,24 +10,21 @@
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:panel header="Prueba con Primefaces">
|
||||
<p:panel header="Pagina principal">
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel value="Fecha" />
|
||||
<p:calendar pattern="dd/MM/yyyy" />
|
||||
<h:outputLabel value="Rich Text Editor" />
|
||||
<p:editor />
|
||||
</h:panelGrid>
|
||||
<h:panelGroup>
|
||||
<h:panelGrid columns="2" >
|
||||
<h:outputLabel value="Logeado como:" />
|
||||
<p:inputText readonly="true" value="#{home.userName}" />
|
||||
</h:panelGrid>
|
||||
</h:panelGroup>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
<h:form align="left">
|
||||
<div style="margin: auto; width: 800px">
|
||||
<div style="display: inline; float: right;">
|
||||
<!-- Crear menu de aplicación solo si estamos logeados -->
|
||||
</div>
|
||||
<br />
|
||||
<p:spinner />
|
||||
<br /> Welcome #{home.userName}
|
||||
<!-- Mostrar página de bienvenida -->
|
||||
</div>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
@@ -1,31 +1,45 @@
|
||||
<?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:f="http://java.sun.com/jsf/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
|
||||
<h:head>
|
||||
<title>login</title>
|
||||
</h:head>
|
||||
<h:outputScript>
|
||||
<script type="text/javascript">
|
||||
function handleLoginRequest(xhr, status, args) {
|
||||
if(args.validationFailed || !args.loggedIn) {
|
||||
PF('dlg').jq.effect("shake", {times:5}, 100);
|
||||
}
|
||||
else {
|
||||
PF('dlg').hide();
|
||||
$('#loginLink').fadeOut();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</h:outputScript>
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<h3>myHealth login</h3>
|
||||
<h:outputText value="Por favor, introduzca su nombre de usuario y contraseña para acceder al sistema."></h:outputText>
|
||||
<h:outputText value="Usuario:" />
|
||||
<h:inputText id="Uusario" value="#{login.userName}"></h:inputText>
|
||||
<h:message for="username"></h:message>
|
||||
<br></br><br></br>
|
||||
<h:outputLink value="javascript:void(0)" onclick="PF('dlg').show();" title="login">
|
||||
<h:outputText>Login</h:outputText>
|
||||
</h:outputLink>
|
||||
|
||||
<h:outputText value="Contraseña" />
|
||||
<h:inputSecret id="password" value="#{login.password}"></h:inputSecret>
|
||||
<h:message for="password"></h:message>
|
||||
<br></br><br></br>
|
||||
<p:growl id="growl" sticky="true" showDetail="true" life="3000" />
|
||||
|
||||
<h:commandButton action="#{login.validateUsernamePassword}" value="Login"></h:commandButton>
|
||||
<h:panelGrid columns="2" cellpadding="5">
|
||||
<h:outputLabel for="username" value="Username:" />
|
||||
<p:inputText id="username" value="#{loginView.username}" required="true" label="username" />
|
||||
|
||||
<h:outputLabel for="password" value="Password:" />
|
||||
<p:password id="password" value="#{loginView.password}" required="true" label="password" />
|
||||
|
||||
<f:facet name="footer">
|
||||
<p:commandButton value="Login" update="growl" action="#{loginView.login}" oncomplete="handleLoginRequest(xhr, status, args)" />
|
||||
</f:facet>
|
||||
</h:panelGrid>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
<ui:define name="content">
|
||||
<h:form id="errorForm">
|
||||
<div align="center">
|
||||
<h1>test Page</h1>
|
||||
<h1>Medical Tests</h1>
|
||||
<hr/>
|
||||
<div>TestPage:</div>
|
||||
<div>Medical Tests TestPage:</div>
|
||||
<div>
|
||||
test page content
|
||||
Medical Tests content
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="errorForm">
|
||||
<h:form id="testForm">
|
||||
<div align="center">
|
||||
<h1>AddPaciente Page</h1>
|
||||
<hr/>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
@@ -11,12 +10,10 @@
|
||||
<h1>ShowPaciente Page</h1>
|
||||
<hr />
|
||||
<div>ShowPaciente:</div>
|
||||
<div>
|
||||
ShowPaciente content
|
||||
</div>
|
||||
<div>ShowPaciente content</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -1,304 +1,3 @@
|
||||
BODY{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.ErrorMessage {
|
||||
color: red;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.col1 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
width: 370px;
|
||||
}
|
||||
|
||||
.col3 {
|
||||
width: 130px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.estilomenu {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.estilomenu2 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
a.estilomenu2:link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;font-weight: bold;text-decoration: none}
|
||||
a.estilomenu2:visited {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;font-weight: bold;text-decoration: none}
|
||||
a.estilomenu2:active {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;font-weight: bold;text-decoration: none}
|
||||
a.estilomenu2:hover {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;font-weight: bold;text-decoration: none}
|
||||
|
||||
.fecha {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a.fecha:link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;text-decoration: none}
|
||||
a.fecha:visited {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;text-decoration: none}
|
||||
a.fecha:active {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;text-decoration: none}
|
||||
a.fecha:hover {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #939393;text-decoration: none}
|
||||
|
||||
.Titulo {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 2.5em;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
.paginacentral {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #939393;
|
||||
}
|
||||
.titulopequeno {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.estilomenucabecera {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.formularios {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
.listado {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
|
||||
.estiloidiomas {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.formulariospequeno {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rojo { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #FF0000}
|
||||
|
||||
|
||||
a:link {color: #FFFFFF}
|
||||
a:active {color: #FFFFFF}
|
||||
a:visited {color: #FFFFFF}
|
||||
a:hover {color: #FFFFFF}
|
||||
|
||||
|
||||
.noticias1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; color: #FFFFFF; text-decoration:none }
|
||||
|
||||
a.apartados:link {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados:visited {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados:active {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados:hover {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
|
||||
|
||||
.pestanas {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;}
|
||||
|
||||
a.pestanas:link {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight:bold; color: #939393; text-decoration: none}
|
||||
a.pestanas:visited {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #939393; text-decoration: none}
|
||||
a.pestanas:active {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #939393; text-decoration: none}
|
||||
a.pestanas:hover {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;color: #939393 ; text-decoration: none}
|
||||
|
||||
|
||||
|
||||
.estiloidiomas {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;}
|
||||
|
||||
a.estiloidiomas:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: none}
|
||||
a.estiloidiomas:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: none}
|
||||
a.estiloidiomas:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: none}
|
||||
a.estiloidiomas:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: none}
|
||||
|
||||
|
||||
a.estiloidiomas2:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: underline}
|
||||
a.estiloidiomas2:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: none}
|
||||
a.estiloidiomas2:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: underline}
|
||||
a.estiloidiomas2:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: 400;color: #939393; text-decoration: underline}
|
||||
|
||||
|
||||
|
||||
a.linknegritasubrrado:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: bold;color: #939393; text-decoration: underline}
|
||||
a.linknegritasubrrado:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: bold;color: #939393; text-decoration: none}
|
||||
a.linknegritasubrrado:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: bold;color: #939393; text-decoration: underline}
|
||||
a.linknegritasubrrado:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;font-weight: bold;color: #939393; text-decoration: underline}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
a.apartados2:link {font-family: Verdana;color:#3131D1 ; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados2:visited {font-family: Verdana;color: #3131D1; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados2:active {font-family: Verdana;color: #3131D1; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
a.apartados2:hover {font-family: Verdana;color: #3131D1; text-decoration: none; font-size: 12px; font-size: 10px; font-weight: bold}
|
||||
|
||||
|
||||
a.apartados3:link {font-family: Verdana;color:#3131D1 ; text-decoration: underline; font-size: 13px; font-size: 10px; font-weight: bold}
|
||||
a.apartados3:visited {font-family: Verdana;color: #3131D1; text-decoration: underline; font-size: 13px; font-size: 10px; font-weight: bold}
|
||||
a.apartados3:active {font-family: Verdana;color: #3131D1; text-decoration: underline; font-size: 13px; font-size: 10px; font-weight: bold}
|
||||
a.apartados3:hover {font-family: Verdana;color: #3131D1; text-decoration: underline; font-size: 13px; font-size: 10px; font-weight: bold}
|
||||
|
||||
|
||||
|
||||
|
||||
a.titulopequeno:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold;color: #939393;text-decoration: none}
|
||||
a.titulopequeno:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold;color: #939393;text-decoration: none}
|
||||
a.titulopequeno:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold;color: #939393;text-decoration: none}
|
||||
a.titulopequeno:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold;color: #939393;text-decoration: none}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
a.inicio:link {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 14px; font-weight: bold}
|
||||
a.inicio:visited {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 14px; font-weight: bold}
|
||||
a.inicio:active {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 14px; font-weight: bold}
|
||||
a.inicio:hover {font-family: Verdana;color: #939393; text-decoration: none; font-size: 12px; font-size: 14px; font-weight: bold}
|
||||
.masinfo {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 400; text-decoration: underline;}
|
||||
|
||||
|
||||
|
||||
|
||||
a.listado:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393;text-decoration:none}
|
||||
a.listado:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393;text-decoration:none}
|
||||
a.listado:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393;text-decoration:none}
|
||||
a.listado:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393;text-decoration:none}
|
||||
|
||||
|
||||
|
||||
.carrito {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold;}
|
||||
|
||||
|
||||
a.carrito:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold;color: #939393;text-decoration:none}
|
||||
a.carrito:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold;color: #939393;text-decoration:none}
|
||||
a.carrito:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold;color: #939393;text-decoration:none}
|
||||
a.carrito:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold;color: #939393; text-decoration:none}
|
||||
|
||||
|
||||
|
||||
.linksabajo {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #666666;}
|
||||
|
||||
a.linksabajo:link {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #666666;}
|
||||
a.linksabajo:visited {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #666666;}
|
||||
a.linksabajo:active {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #666666;}
|
||||
a.linksabajo:hover {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #666666;}
|
||||
|
||||
|
||||
|
||||
a.masinfo:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 400; text-decoration: underline;color: #939393;}
|
||||
a.masinfo:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 400; text-decoration: underline;color: #939393;}
|
||||
a.masinfo:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 400; text-decoration: underline;color: #939393;}
|
||||
a.masinfo:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 400; text-decoration: underline;color: #939393;}.estilonoticias {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
.estilorecomanacions {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
color: #A0630F;
|
||||
|
||||
}
|
||||
.estilonovetats {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
color: #2F2F2F;
|
||||
|
||||
}
|
||||
.resaltado {
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
color: #2F2F2F;
|
||||
}
|
||||
.destacado {
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 2px;
|
||||
color: #800000;
|
||||
}
|
||||
.registro {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #939393}
|
||||
|
||||
|
||||
a.registro:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #939393; text-decoration: none}
|
||||
a.registro:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #939393; text-decoration: none}
|
||||
a.registro:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #939393; text-decoration: none}
|
||||
a.registro:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold ; color: #939393; text-decoration: underline}
|
||||
|
||||
|
||||
|
||||
|
||||
.listadogris {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393; font-weight: bold;}
|
||||
|
||||
a.listadogris:link {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393; font-weight: bold; text-decoration: none}
|
||||
a.listadogris:visited {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393; font-weight: bold; text-decoration: none}
|
||||
a.listadogris:active {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393; font-weight: bold; text-decoration: none}
|
||||
a.listadogris:hover {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #939393; font-weight: bold; text-decoration: underline}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.botonpeque {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 9px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.formulariosNegrita {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
.destacadopeque {
|
||||
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #404040;
|
||||
}
|
||||
.listadogris {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: #939393;
|
||||
font-weight: bold;
|
||||
|
||||
|
||||
}
|
||||
.linklistado { font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;font-weight: 400;color: #939393; }
|
||||
@@ -8,15 +8,15 @@
|
||||
<ui:define name="content">
|
||||
<h:form id="errorForm">
|
||||
<div align="center">
|
||||
<h1>test Page</h1>
|
||||
<h1>System Admin Page</h1>
|
||||
<hr/>
|
||||
<div>TestPage:</div>
|
||||
<div>System Admin TestPage:</div>
|
||||
<div>
|
||||
test page content
|
||||
System Admin page content
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
@@ -8,15 +8,15 @@
|
||||
<ui:define name="content">
|
||||
<h:form id="errorForm">
|
||||
<div align="center">
|
||||
<h1>test Page</h1>
|
||||
<h1>Visit Page</h1>
|
||||
<hr/>
|
||||
<div>TestPage:</div>
|
||||
<div>Visit TestPage:</div>
|
||||
<div>
|
||||
test page content
|
||||
Visit page content
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
@@ -1,10 +0,0 @@
|
||||
package common;
|
||||
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.faces.annotation.FacesConfig;
|
||||
|
||||
@FacesConfig
|
||||
@ApplicationScoped
|
||||
public class ApplicationConfig {
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
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");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
package common;
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
115
1.sources/MyHealth/src/managedbean/common/MenuMBean.java
Normal file
115
1.sources/MyHealth/src/managedbean/common/MenuMBean.java
Normal file
@@ -0,0 +1,115 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.inject.Named;
|
||||
|
||||
import org.primefaces.model.menu.DefaultMenuItem;
|
||||
import org.primefaces.model.menu.DefaultMenuModel;
|
||||
import org.primefaces.model.menu.DefaultSubMenu;
|
||||
import org.primefaces.model.menu.MenuModel;
|
||||
|
||||
@Named("menuView")
|
||||
@RequestScoped
|
||||
public class MenuMBean implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private MenuModel model;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
model = new DefaultMenuModel();
|
||||
|
||||
// First submenu
|
||||
DefaultSubMenu firstSubmenu = new DefaultSubMenu("Dynamic submenu");
|
||||
DefaultMenuItem item = new DefaultMenuItem("External", "", "www.google.com");
|
||||
// item.setUrl("www.google.com");
|
||||
firstSubmenu.getElements().add(item);
|
||||
|
||||
model.getElements().add(firstSubmenu);
|
||||
|
||||
// Second submenu
|
||||
DefaultSubMenu secondSubmenu = new DefaultSubMenu("Dynamic Actions");
|
||||
|
||||
item = new DefaultMenuItem("Save", "pi pi-save");
|
||||
item.setCommand("#{menuView.save}");
|
||||
item.setUpdate("messages");
|
||||
secondSubmenu.getElements().add(item);
|
||||
|
||||
item = new DefaultMenuItem("Delete", "pi pi-times");
|
||||
item.setCommand("#{menuView.delete}");
|
||||
item.setAjax(false);
|
||||
secondSubmenu.getElements().add(item);
|
||||
|
||||
item = new DefaultMenuItem("Redirect", "pi pi-search");
|
||||
item.setCommand("#{menuView.redirect}");
|
||||
secondSubmenu.getElements().add(item);
|
||||
|
||||
model.getElements().add(secondSubmenu);
|
||||
}
|
||||
|
||||
public MenuModel getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
addMessage("Success", "Data saved");
|
||||
}
|
||||
|
||||
public void update() {
|
||||
addMessage("Success", "Data updated");
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
addMessage("Success", "Data deleted");
|
||||
}
|
||||
|
||||
public String goManageSpecialties() {
|
||||
|
||||
return "ManageSpecialties";
|
||||
}
|
||||
|
||||
public String goVisit() {
|
||||
return "VisitView";
|
||||
}
|
||||
|
||||
public String goMedicalTests() {
|
||||
return "MedicalTests";
|
||||
}
|
||||
|
||||
public String goListSpecialistDoctors() {
|
||||
return "header";
|
||||
}
|
||||
|
||||
public String goListSpecialistDoctorsBySpecialty() {
|
||||
return "header";
|
||||
}
|
||||
|
||||
public String goListaFamilyDoctors() {
|
||||
return "header";
|
||||
}
|
||||
|
||||
public String goChangeDoctor() {
|
||||
return "header";
|
||||
}
|
||||
|
||||
public String goChangeCAP() {
|
||||
return "header";
|
||||
}
|
||||
|
||||
public String goAddPatient() {
|
||||
return "profile/AddPaciente";
|
||||
}
|
||||
|
||||
public void addMessage(String summary, String detail) {
|
||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
package common;
|
||||
package managedbean.common;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
|
||||
public class SessionUtils {
|
||||
|
||||
public static HttpSession getSession() {
|
||||
@@ -15,16 +16,26 @@ public class SessionUtils {
|
||||
return (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
|
||||
}
|
||||
|
||||
public static boolean isLogedIn() {
|
||||
if (getUserId() == "")
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String getUserName() {
|
||||
HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
|
||||
HttpSession session = getSession();
|
||||
if (session != null && session.getAttribute("username") != null)
|
||||
return session.getAttribute("username").toString();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getUserId() {
|
||||
HttpSession session = getSession();
|
||||
if (session != null)
|
||||
return (String) session.getAttribute("userid");
|
||||
if (session != null && session.getAttribute("userid") != null)
|
||||
return session.getAttribute("userid").toString();
|
||||
else
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
41
1.sources/MyHealth/src/managedbean/common/homeMBean.java
Normal file
41
1.sources/MyHealth/src/managedbean/common/homeMBean.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/***
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@Named("home")
|
||||
@RequestScoped
|
||||
public class homeMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean isLogedIn;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
isLogedIn = SessionUtils.isLogedIn();
|
||||
}
|
||||
|
||||
public boolean isLogedIn() {
|
||||
return this.isLogedIn;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
if (this.isLogedIn == false)
|
||||
return "Invitado";
|
||||
else
|
||||
return SessionUtils.getUserName();
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return SessionUtils.getUserId();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -18,8 +18,8 @@ import ejb.medicalTest.MedicalTestFacadeRemote;
|
||||
* @author mark
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "MedicalTestMBean")
|
||||
@SessionScoped
|
||||
@Named("MedicalTestMBean")
|
||||
@RequestScoped
|
||||
public class MedicalTestMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
package managedbean.profile;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
import ejb.profile.ProfileFacadeRemote;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/***
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "AddFamilyDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named("AddFamilyDoctorMBean")
|
||||
@RequestScoped
|
||||
public class AddFamilyDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -31,5 +25,4 @@ public class AddFamilyDoctorMBean extends ProfileMBeanBase implements Serializab
|
||||
super.initializeProfileFacadeRemote();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ package managedbean.profile;
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -18,8 +17,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author mark
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "AddPatientMBean")
|
||||
@SessionScoped
|
||||
@Named( "AddPatientMBean")
|
||||
@RequestScoped
|
||||
public class AddPatientMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package managedbean.profile;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
import ejb.profile.ProfileFacadeRemote;
|
||||
|
||||
@@ -16,8 +13,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "AddSpecialistDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named( "AddSpecialistDoctorMBean")
|
||||
@RequestScoped
|
||||
public class AddSpecialistDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "ChangeFamilyDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named( "ChangeFamilyDoctorMBean")
|
||||
@RequestScoped
|
||||
public class ChangeFamilyDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "ChangePrimaryHealthCareCenterMBean")
|
||||
@SessionScoped
|
||||
@Named( "ChangePrimaryHealthCareCenterMBean")
|
||||
@RequestScoped
|
||||
public class ChangePrimaryHealthCareCenterMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -3,11 +3,13 @@ package managedbean.profile;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
import ejb.profile.ProfileFacadeRemote;
|
||||
|
||||
@Named("profileMBean")
|
||||
public class ProfileMBeanBase {
|
||||
@EJB
|
||||
protected ProfileFacadeRemote remoteManager;
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "ShowFamilyDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named( "ShowFamilyDoctorMBean")
|
||||
@RequestScoped
|
||||
public class ShowFamilyDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "ShowPatientMBean")
|
||||
@SessionScoped
|
||||
@Named("ShowPatientMBean")
|
||||
@RequestScoped
|
||||
public class ShowPatientMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -42,8 +42,7 @@ public class ShowPatientMBean extends ProfileMBeanBase implements Serializable {
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (ProfileFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
remoteManager = (ProfileFacadeRemote) ctx.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "ShowSpecialistDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named( "ShowSpecialistDoctorMBean")
|
||||
@RequestScoped
|
||||
public class ShowSpecialistDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "UpdateFamilyDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named("UpdateFamilyDoctorMBean")
|
||||
@RequestScoped
|
||||
public class UpdateFamilyDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -42,8 +42,7 @@ public class UpdateFamilyDoctorMBean extends ProfileMBeanBase implements Seriali
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (ProfileFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
remoteManager = (ProfileFacadeRemote) ctx.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "UpdatePatientMBean")
|
||||
@SessionScoped
|
||||
@Named("UpdatePatientMBean")
|
||||
@RequestScoped
|
||||
public class UpdatePatientMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -42,8 +42,7 @@ public class UpdatePatientMBean extends ProfileMBeanBase implements Serializable
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (ProfileFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
remoteManager = (ProfileFacadeRemote) ctx.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -16,8 +16,8 @@ import ejb.profile.ProfileFacadeRemote;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "UpdateSpecialistDoctorMBean")
|
||||
@SessionScoped
|
||||
@Named("UpdateSpecialistDoctorMBean")
|
||||
@RequestScoped
|
||||
public class UpdateSpecialistDoctorMBean extends ProfileMBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -42,8 +42,7 @@ public class UpdateSpecialistDoctorMBean extends ProfileMBeanBase implements Ser
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (ProfileFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
remoteManager = (ProfileFacadeRemote) ctx.lookup("java:app/myHealth.jar/ProfileFacadeBean!ejb.component.ProfileFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,63 +1,56 @@
|
||||
package managedbean.systemAdmin;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.inject.Named;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import common.SessionUtils;
|
||||
import org.primefaces.PrimeFaces;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ManagedBean(name = "login")
|
||||
@SessionScoped
|
||||
public class LoginMBean implements Serializable {
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
private static final long serialVersionUID = 1094801825228386363L;
|
||||
@Named("loginView")
|
||||
@RequestScoped
|
||||
public class LoginMBean {
|
||||
|
||||
private String Password;
|
||||
private String msg;
|
||||
private String userName;
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return Password;
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String pwd) {
|
||||
this.Password = pwd;
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public void login() {
|
||||
FacesMessage message = null;
|
||||
boolean loggedIn = false;
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String user) {
|
||||
this.userName = user;
|
||||
}
|
||||
|
||||
// validate login
|
||||
public String validateUsernamePassword() {
|
||||
// TODO: Validar login
|
||||
boolean valid = this.userName.startsWith("a");
|
||||
if (valid) {
|
||||
if (username != null && username.equals("admin") && password != null && password.equals("admin")) {
|
||||
loggedIn = true;
|
||||
HttpSession session = SessionUtils.getSession();
|
||||
session.setAttribute("username", userName);
|
||||
return "home";
|
||||
session.setAttribute("username", username);
|
||||
session.setAttribute("userid", "1");
|
||||
message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Bienvenido", username);
|
||||
} else {
|
||||
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN,
|
||||
"Usuario o contraseña incorrecta", "Por favor, intentalo de nuevo"));
|
||||
return "login";
|
||||
loggedIn = false;
|
||||
message = new FacesMessage(FacesMessage.SEVERITY_WARN, "Loggin Error", "El usuario o la contraseña son incorrectos");
|
||||
}
|
||||
|
||||
FacesContext.getCurrentInstance().addMessage(null, message);
|
||||
PrimeFaces.current().ajax().addCallbackParam("loggedIn", loggedIn);
|
||||
}
|
||||
|
||||
// logout event, invalidate session
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -18,8 +18,8 @@ import ejb.systemAdmin.SystemAdminFacadeRemote;
|
||||
* @author mark
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "SystemAdminMBean")
|
||||
@SessionScoped
|
||||
@Named("SystemAdminMBean")
|
||||
@RequestScoped
|
||||
public class SystemAdminMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -44,8 +44,7 @@ public class SystemAdminMBean implements Serializable {
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (SystemAdminFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.SystemAdminFacadeRemote");
|
||||
remoteManager = (SystemAdminFacadeRemote) ctx.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.SystemAdminFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.bean.ManagedBean;
|
||||
import javax.faces.bean.SessionScoped;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
@@ -18,8 +18,8 @@ import ejb.visit.VisitFacadeRemote;
|
||||
* @author mark
|
||||
*
|
||||
*/
|
||||
@ManagedBean(name = "SystemAdminMBean")
|
||||
@SessionScoped
|
||||
@Named("VisitMBean")
|
||||
@RequestScoped
|
||||
public class VisitMBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -44,8 +44,7 @@ public class VisitMBean implements Serializable {
|
||||
private void initializeAdminFacadeRemote() throws Exception {
|
||||
Properties props = System.getProperties();
|
||||
Context ctx = new InitialContext(props);
|
||||
remoteManager = (VisitFacadeRemote) ctx
|
||||
.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.VisitFacadeRemote");
|
||||
remoteManager = (VisitFacadeRemote) ctx.lookup("java:app/myHealth.jar/ClassFacadeBean!ejb.component.VisitFacadeRemote");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user