<?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/productosP.xhtml" >
< ui:define name = "top" >
< center >
< / center >
< / ui:define >
< ui:define name = "left" >
< div class = "card" style = "text-align: left;" >
< h:form >
< p:growl id = "messages" showDetail = "true" / >
< p:tieredMenu style = "width:170px" >
< p:submenu label = "Usuarios" >
< p:menuitem value = "Usuario" outcome = "marcaLista3.xhtml" ajax = "false" / >
< p:menuitem value = "Rol" outcome = "rolLista.xhtml" ajax = "false" / >
< / p:submenu >
< p:submenu label = "Proveedores" >
< p:menuitem value = "Proveedor" outcome = "vistaProveedores.xhtml" ajax = "false" / >
< p:menuitem value = "Almacen" outcome = "ubicacionLista.xhtml" ajax = "false" / >
< / p:submenu >
< p:submenu label = "Productos" >
< p:menuitem value = "Producto" outcome = "productosLista.xhtml" ajax = "false" / >
< p:menuitem value = "Categoria" outcome = "categoriaLista.xhtml" ajax = "false" / >
< p:menuitem value = "Talla" outcome = "tallaLista.xhtml" ajax = "false" / >
< p:menuitem value = "Color" outcome = "colorLista.xhtml" ajax = "false" / >
< p:menuitem value = "Marca" outcome = "marcaLista.xhtml" ajax = "false" / >
< p:menuitem value = "Genero" outcome = "vistaGenero.xhtml" ajax = "false" / >
< / p:submenu >
< p:submenu label = "Sesión" >
< p:divider / >
< p:menuitem value = "Token" outcome = "tokenLista.xhtml" ajax = "false" / >
< p:menuitem value = "Cerrar sesión" icon = "pi pi-fw pi-power-off" action = "#{demoBeanLogin.logout()}" / >
< / p:submenu >
< / p:tieredMenu >
< / h:form >
< / div >
< / ui:define >
< ui:define name = "right" >
< / ui:define >
< ui:define name = "content" >
< f:view >
< center >
< h:form style = "background-color: white; margin: -10px;" >
< h1 > < h:outputText style = "color: black;" value = "#{demoBeanProveedores.titulo}" / > < / h1 >
< p:dataTable value = "#{demoBeanCategoria.categoria}" var = "itemC" > < / p:dataTable >
< p:growl id = "growl" showDetail = "true" / >
< div style = "margin: 20px;" >
< p:outputLabel value = "Nombre:" for = "nombre" / >
< p:inputText id = "nombre" value = "#{demoBeanProveedores.proveedor.nombre}" style = "margin: 10px; margin-right: 35px; margin-bottom: 20px;" title = "nombre" required = "true" validatorMessage = "El nombre debe de ser minimo de tres letras." requiredMessage = "Se requiere el campo nombre." >
< f:validateRegex pattern = "^[a-zA-Z]{3,}+$" for = "nombre" / >
< / p:inputText >
< p:outputLabel value = "Correo:" for = "correo" / >
< p:inputText id = "correo" value = "#{demoBeanProveedores.proveedor.correo}" style = "margin-left: 10px; margin-right: 10px; margin-bottom: 20px" title = "correo" required = "true" validatorMessage = "El correo no es valido" requiredMessage = "Se requiere el campo correo." >
< f:validateRegex pattern = "^[\w\.-]+@[\w\.-]+\.\w+$" for = "correo" / >
< / p:inputText >
< / div >
< div >
< p:outputLabel value = "Direccion:" for = "direccion" / >
< p:inputText id = "direccion" value = "#{demoBeanProveedores.proveedor.direccion}" style = "margin-left: 10px; margin-right: 26px; margin-bottom: 20px" title = "direccion" required = "true" validatorMessage = "La direeccion no es valida " requiredMessage = "Se requiere el campo direccion." >
< f:validateRegex pattern = "^[a-zA-Z0-9\s]+$" for = "direccion" / >
< / p:inputText >
< p:outputLabel value = "Telefono" for = "telefono" / >
< p:inputText id = "telefono" value = "#{demoBeanProveedores.proveedor.telefono}" style = "margin-left: 10px; margin-right: 19px; margin-bottom: 20px" title = "telefono" required = "true" validatorMessage = "El telefono debe de llevar la extension de tu pais." requiredMessage = "Se requiere el campo telefono." >
< f:validateRegex pattern = "^[+]+[0-9]{2}+[0-9]{10}+$" for = "telefono" / >
< / p:inputText >
< / div >
< div >
< h:outputText value = "Pais *" style = "font-size: 16px" / >
< p:selectOneMenu id = "paises" value = "#{demoBeanProveedores.p}" style = "margin: 20px" converter = "selectOneMenuConverter" title = "pais" required = "true" appendTo = "@this" >
< f:selectItems id = "pais" value = "#{demoBeanProveedores.SeleccionarPais()}" / >
< p:ajax listener = "#{demoBeanProveedores.SeleccionarEstado()}" update = "estados" / >
< / p:selectOneMenu >
< h:outputText value = "Estado *" style = "font-size: 16px" / >
< p:selectOneMenu id = "estados" value = "#{demoBeanProveedores.e}" style = "margin: 20px" converter = "selectOneMenuConverter" title = "estado" required = "true" appendTo = "@this" >
< f:selectItems id = "estado" value = "#{demoBeanProveedores.SeleccionarEstado()}" / >
< p:ajax listener = "#{demoBeanProveedores.SeleccionarCiudad()}" update = "ciudades" / >
< / p:selectOneMenu >
< h:outputText value = "Ciudad *" style = "font-size: 16px" / >
< p:selectOneMenu id = "ciudades" value = "#{demoBeanProveedores.c}" style = "margin: 20px" converter = "selectOneMenuConverter" title = "ciudad" required = "true" appendTo = "@this" >
< f:selectItems id = "ciudad" value = "#{demoBeanProveedores.SeleccionarCiudad()}" / >
< / p:selectOneMenu >
< / div >
< div style = "padding-left: 10px; margin-left: 10px; margin-right: -296px;" >
< p:outputLabel value = "Tipo_Producto:" for = "categoriaid" / >
< p:selectOneMenu id = "categoriaid" value = "#{demoBeanProveedores.proveedor.categoriaid}" converter = "selectOneMenuConverter" style = "margin-left: 20px; margin-right: 150px; margin-bottom: 20px" title = "Categoriaid" required = "true" requiredMessage = "Se requiere campo Categoria." appendTo = "@this" >
< f:selectItems value = "#{demoBeanCategoria.categoria}" var = "itemC" itemLabel = "#{itemC.categoria}" itemValue = "#{itemC}" / >
< / p:selectOneMenu >
< / div >
< p:commandButton action = "vistaProveedores.xhtml" style = "margin-left: 100px; margin-right: -200px; margin-bottom: 20px;" value = "Cancelar" styleClass = "rounded-button ui-button-danger" immediate = "true" ajax = "false" / >
< p:commandButton action = "#{demoBeanProveedores.agregarProveedor()}" value = "Guardar" style = "margin-left: 10px; margin-right: -300px; margin-bottom: 20px;" update = "growl" styleClass = "rounded-button ui-button-success" rendered = "#{demoBeanProveedores.nuevo}" ajax = "false" / >
< p:commandButton action = "vistaProveedores.xhtml" style = "margin-left: 10px; margin-right: -270px;" actionListener = "#{demoBeanProveedores.editarProveedor()}" value = "Editar" update = "growl" styleClass = "rounded-button ui-button-success" rendered = "#{!demoBeanProveedores.nuevo}" ajax = "false" / >
< / h:form >
< / center >
< / f:view >
< / ui:define >
< / ui:composition >
< / body >
< / html >