You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
4.7 KiB
86 lines
4.7 KiB
7 months ago
|
<?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://xmlns.jcp.org/jsf/facelets"
|
||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||
|
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||
|
xmlns:p="http://primefaces.org/ui">
|
||
|
|
||
|
<body>
|
||
|
<center>
|
||
|
|
||
|
<ui:composition template="./template/Principal.xhtml">
|
||
|
|
||
|
<ui:define name="top">
|
||
|
Sistemas de Inventario
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="left">
|
||
|
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="right">
|
||
|
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="content">
|
||
|
|
||
|
<f:view>
|
||
|
|
||
|
<h:form>
|
||
|
<h1><h:outputText value="#{demoBeanDepartamento.titulo}"/></h1>
|
||
|
<h:panelGrid columns="3">
|
||
|
|
||
|
<p:outputLabel for="nombre" value="Nombre:"/>
|
||
|
<p:inputText id="nombre" value="#{demoBeanDepartamento.departamento.nombre}"
|
||
|
title="Nombre" required="true"
|
||
|
requiredMessage="El campo nombre es obligatorio"
|
||
|
validatorMessage="El campo nombre solo letras un máximo 15 letras">
|
||
|
<f:validateRegex pattern="[a-zA-Z ]+" />
|
||
|
<f:validateLength minimum="3" maximum="15" />
|
||
|
</p:inputText>
|
||
|
<p:message for="nombre"/>
|
||
|
|
||
|
<p:outputLabel for="anaquel" value="Anaquel:"/>
|
||
|
<p:inputText id="anaquel" value="#{demoBeanDepartamento.departamento.anaquel}"
|
||
|
title="Anaquel" required="true"
|
||
|
requiredMessage="El campo anaquel es obligatorio"
|
||
|
validatorMessage="El campo anaquel debe incluir una letra y un número">
|
||
|
<f:validateRegex pattern="^[a-zA-Z]\d$" />
|
||
|
<f:validateLength minimum="1" maximum="2" />
|
||
|
</p:inputText>
|
||
|
<p:message for="anaquel"/>
|
||
|
</h:panelGrid>
|
||
|
<p:commandButton action="#{demoBeanDepartamento.agregarDepartamento()}"
|
||
|
icon="pi pi-fw pi-check"
|
||
|
style="padding: 2px 8px; font-size: 13px; font-weight: bold; color: #3366FF; background-color: #fff; border: 2px solid #3366FF; border-radius: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease ; margin-right: 6px;"
|
||
|
|
||
|
rendered="#{demoBeanDepartamento.nuevo}"
|
||
|
value="Agregar"
|
||
|
ajax="false"/>
|
||
|
|
||
|
<p:commandButton action="Departamento.xhtml"
|
||
|
actionListener="#{demoBeanDepartamento.editarDepartamento()}"
|
||
|
icon="pi pi-fw pi-pencil"
|
||
|
style="padding: 2px 8px; font-size: 13px; font-weight: bold; color: #3366FF; background-color: #fff; border: 2px solid #3366FF; border-radius: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease ; margin-right: 6px;"
|
||
|
|
||
|
rendered="#{!demoBeanDepartamento.nuevo}"
|
||
|
value="Editar"
|
||
|
ajax="false"/>
|
||
|
|
||
|
<p:commandButton action="Departamento.xhtml" icon="pi pi-fw pi-times"
|
||
|
value="Cancelar"
|
||
|
style=" padding: 2px 8px; font-size: 13px; font-weight: bold; color: #990000; background-color: #fff; border: 2px solid #FF0000; border-radius: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease; margin-right: 6px;"
|
||
|
|
||
|
immediate="true"
|
||
|
ajax="false"/>
|
||
|
|
||
|
</h:form>
|
||
|
</f:view>
|
||
|
</ui:define>
|
||
|
<ui:define name="bottom">
|
||
|
</ui:define>
|
||
|
</ui:composition>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|