<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
    <title>Inicio de sesión</title>
    <h:outputStylesheet library="css" name="styles.css" />
</h:head>
<h:body>
    <h:form id="loginForm">
        <h2>Bienvenido</h2>
        <h:panelGrid columns="2" id="loginPanel">
            <h:outputLabel for="username" value="Usuario:" />
            <h:inputText id="username" value="#{demoBeanLogin.username}" required="true" validatorMessage="Se requiere campo Usuario" >
                <f:validateLength minimum="1" maximum="100" />
            </h:inputText>

            <h:outputLabel for="password" value="Contraseña:" />
            <h:inputSecret id="password" value="#{demoBeanLogin.password}" required="true" validatorMessage="Se requiere campo Contraseña" >
                <f:validateLength minimum="1" maximum="100" />
            </h:inputSecret>

            <h:commandButton value="Iniciar sesión" action="#{demoBeanLogin.buscarPorLogin}" />

            <h:messages globalOnly="true" styleClass="error" />
        </h:panelGrid>
    </h:form>
</h:body>
</html>