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.
95 lines
4.4 KiB
95 lines
4.4 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>
|
||
|
|
||
|
<ui:composition template="./template/principal.xhtml">
|
||
|
|
||
|
<ui:define name="top">
|
||
|
top
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="left">
|
||
|
left
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="right">
|
||
|
right
|
||
|
</ui:define>
|
||
|
|
||
|
<ui:define name="content">
|
||
|
<f:view>
|
||
|
|
||
|
|
||
|
<h:form>
|
||
|
<h1><h:outputText value="#{demoBeanProveedor.titulo}"/></h1>
|
||
|
<h:panelGrid columns="2" cellpadding="7">
|
||
|
<p:outputLabel value="Nombre:" for="nombre" />
|
||
|
|
||
|
<p:inputText id="nombre"
|
||
|
value="#{demoBeanProveedor.proveedor.nombre}"
|
||
|
title="Nombre"
|
||
|
required="true"
|
||
|
validatorMessage="El nombre no es valido"
|
||
|
requiredMessage="Este campo no puede estar vacio">
|
||
|
|
||
|
<f:validateRegex pattern="\b[A-ZÁÉÍÓÚÜÑ][a-záéíóúüñ]{1,}(?:\s+[A-ZÁÉÍÓÚÜÑ][a-záéíóúüñ]{1,})*\b"
|
||
|
for="nombre"/>
|
||
|
|
||
|
</p:inputText>
|
||
|
|
||
|
|
||
|
<p:outputLabel value="Telefono:" for="telefono" />
|
||
|
<p:inputText id="telefono"
|
||
|
value="#{demoBeanProveedor.proveedor.telefono}"
|
||
|
title="Telefono"
|
||
|
required="true" validatorMessage="El numero de telefono no es valido"
|
||
|
requiredMessage="Este campo no puede estar vacio">
|
||
|
|
||
|
<f:validateRegex pattern="^\d{10}$"
|
||
|
for="telefono"/>
|
||
|
|
||
|
</p:inputText>
|
||
|
|
||
|
<p:outputLabel value="Email:" for="email" />
|
||
|
<p:inputText id="email"
|
||
|
value="#{demoBeanProveedor.proveedor.email}"
|
||
|
title="Email"required="true" validatorMessage="El email no es valido"
|
||
|
requiredMessage="Este campo no puede estar vacio">
|
||
|
|
||
|
<f:validateRegex pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
|
||
|
|
||
|
for="email"/>
|
||
|
|
||
|
</p:inputText>
|
||
|
|
||
|
|
||
|
<p:commandButton action="#{demoBeanProveedor.agregar()}"
|
||
|
rendered="#{demoBeanProveedor.nuevo}"
|
||
|
styleClass="ui-button-success" style="width: 50px;" icon="pi pi-check"
|
||
|
update="messages" ajax="false"/>
|
||
|
|
||
|
<p:commandButton action="proveedorLista.xhtml"
|
||
|
actionListener="#{demoBeanProveedor.editarP()}"
|
||
|
rendered="#{!demoBeanProveedor.nuevo}"
|
||
|
styleClass="ui-button-secondary"
|
||
|
icon="pi pi-pencil"
|
||
|
value="Editar" ajax="false"/>
|
||
|
|
||
|
<p:commandButton action="proveedorLista.xhtml" style="margin-left: 5px; width: 50px; " icon="pi pi-times" styleClass="ui-button-danger" ajax="false" immediate="true"/>
|
||
|
|
||
|
</h:form>
|
||
|
</f:view>
|
||
|
|
||
|
</ui:define>
|
||
|
|
||
|
</ui:composition>
|
||
|
|
||
|
</body>
|
||
|
</html>
|