Cambio en la descripción de PDS MyHealth a MyHealth
Configuración de regla de navegación para JSF. Pruebas con primefaces Nuevo ManagedBean para pantalla home. Pagina de login para pruebas.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<?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"
|
||||
@@ -6,8 +8,10 @@
|
||||
<navigation-rule>
|
||||
<from-view-id>/login.xhtml</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>admin</from-outcome>
|
||||
<to-view-id>/admin.xhtml</to-view-id>
|
||||
<from-outcome>home</from-outcome>
|
||||
<to-view-id>/home.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
</faces-config>
|
||||
|
||||
|
||||
</faces-config>
|
||||
BIN
1.sources/MyHealth/docroot/WEB-INF/lib/primefaces-7.0.jar
Normal file
BIN
1.sources/MyHealth/docroot/WEB-INF/lib/primefaces-7.0.jar
Normal file
Binary file not shown.
@@ -30,14 +30,18 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
<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>ErrowView.xhtml</location>
|
||||
<location>/error.xhtml</location>
|
||||
</error-page>
|
||||
|
||||
<!-- The Welcome File List -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>HomeView.xhtml</welcome-file>
|
||||
<welcome-file>home.xhtml</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<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: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" />
|
||||
@@ -15,12 +16,14 @@
|
||||
<h:body>
|
||||
<div id="layout">
|
||||
<div id="top" class="top">
|
||||
<h1 class="Titulo">myHealth page header</h1>
|
||||
<h1 class="Titulo">myHealth Site</h1>
|
||||
</div>
|
||||
<hr />
|
||||
<div id="menucontainer" class="estilomenu">
|
||||
<p:spinner></p:spinner>
|
||||
|
||||
<h:form>
|
||||
<p>Welcome #{login.userName}, <h:commandLink action="#{login.logout}" value="Logout"></h:commandLink></p>
|
||||
<p>Welcome #{login.userName}, <h:commandLink action="#{login.logout}" value="Logout">Logout</h:commandLink></p>
|
||||
</h:form>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
<?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">
|
||||
<f:metadata>
|
||||
<f:viewParam name="refresh" value="#{specs.refresh}"/>
|
||||
</f:metadata>
|
||||
|
||||
<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}" />
|
||||
</f:metadata>
|
||||
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<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 -->
|
||||
<h:form>
|
||||
<p:panel header="Prueba con Primefaces">
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel value="Fecha" />
|
||||
<p:calendar pattern="dd/MM/yyyy" />
|
||||
</h:panelGrid>
|
||||
</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>
|
||||
<br /><br />
|
||||
<!-- Mostrar página de bienvenida -->
|
||||
</div>
|
||||
</h:form>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
@@ -1,15 +1,20 @@
|
||||
<?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>
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<h3>myHealth login page</h3>
|
||||
<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>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="homeView?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?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">
|
||||
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="errorForm">
|
||||
<div align="center">
|
||||
<h1>test Page</h1>
|
||||
<hr/>
|
||||
<div>TestPage:</div>
|
||||
<div>
|
||||
test page content
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="homeView?refresh=1" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p align="center">
|
||||
<h:button value="Volver al inicio" outcome="homeView?refresh=1" />
|
||||
<h:button value="Volver al inicio" outcome="home?refresh=1" />
|
||||
</p>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
|
||||
Reference in New Issue
Block a user