@ -6,7 +6,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
< body >
@ -17,9 +17,9 @@
< / ui:define >
< ui:define name = "left" >
< h:form >
< p:menu style = "border-color: gray; margin: 1px; width: 163px; height: 600px; " >
< h:form >
< p:menu style = "border-color: gray; margin: 1px; width: 163px; height: 600px;" >
< p:menuitem action = "ProductoLista.xhtml" value = "Productos" ajax = "false" icon = "pi pi-shopping-bag" iconPos = "left" style = "background-color: lightgray" styleClass = "botonMenu" / >
< p:menuitem action = "proveedorLista.xhtml" value = "Proveedores" ajax = "false" icon = "pi pi-id-card" iconPos = "left" style = "background-color: white " styleClass = "botonMenu" / >
@ -29,47 +29,34 @@
< p:menuitem action = "usuariosLista.xhtml" value = "Usuarios" ajax = "false" icon = "pi pi-users" iconPos = "left" style = "background-color: white" styleClass = "botonMenu" / >
< / p:menu >
< / h:form >
< / ui:define >
< ui:define name = "content" >
< f:view >
< h:form id = "formtabla" >
< p:growl id = "growl" showDetail = "true" / >
< p:growl id = "growl" showDetail = "true" / >
< p:dataTable id = "tabla" value = "#{demoBeanMarca.marcas}" var = "item"
widgetVar="marcas" emptyMessage="No se han encontrado marcas"
filteredValue="#{demoBeanMarca.filteredCustomers3}"
globalFilterFunction="#{demoBeanMarca.globalFilterFunction}"
scrollable="true" scrollHeight="480" >
< f:facet name = "header" >
< f:facet name = "header" >
< div class = "flex justify-content-end" style = "height: 30px;" >
< div >
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanMarca.prepararnuevo()}" update = ":dialog" value = "Nuevo" icon = "pi pi-plus" / >
< i class = "pi pi-search" style = "margin-left: 765px; margin-top: 10px;" > < / i >
< p:inputText id = "globalFilter" onkeyup = "PF('marcas').filter()" style = "width:300px; margin-left: 10px; margin-top: -40px; float: right;"
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanMarca.prepararnuevo()}"
update=":dialog" value="Nuevo" icon="pi pi-plus" />
< i class = "pi pi-search" style = "margin-left: 765px; margin-top: 10px;" > < / i >
< p:inputText id = "globalFilter" onkeyup = "PF('marcas').filter()" style = "width:300px; margin-left: 10px; margin-top: -40px; float: right;"
placeholder="Buscar marca" />
< / div >
< / div >
< / f:facet >
< / f:facet >
< p:column styleClass = "columnaId" >
< f:facet name = "header" >
< h:outputText value = "Id" style = "font-weight:bolder" / >
@ -82,72 +69,72 @@
< / f:facet >
< h:outputText value = "#{item.nombre}" style = "margin-left: 170px" / >
< / p:column >
< p:column >
< p:column >
< f:facet name = "header" >
< h:outputText value = "Proveedor" style = "font-weight:bolder" / >
< / f:facet >
< h:outputText value = "#{item.proveedorId.nombre} " style = "margin-left: 170px" / >
< h:outputText value = "#{item.proveedorId.nombre} " style = "margin-left: 170px" / >
< / p:column >
< p:column styleClass = "columnaOpc" >
< p:column styleClass = "columnaOpc" >
< f:facet name = "header" >
< h:outputText value = "Opciones" style = "font-weight:bolder; margin-right: 90px" / >
< / f:facet >
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanMarca.preparareditar(item)}" update = ":dialog" style = "margin-right: 10px; " icon = "pi pi-file-edit" / >
< p:commandButton action = "marcaEliminar.xhtml" actionListener = "#{demoBeanMarca.preparareliminar(item)}" style = "background-color: red; color:white; border-color: red; " icon = "pi pi-trash" / > < / p:column >
< p:commandButton ajax = "true" oncomplete = "PF('dlg').show();" actionListener = "#{demoBeanMarca.preparareditar(item)}" update = ":dialog" style = "margin-right: 10px; " icon = "pi pi-file-edit" / >
< p:commandButton action = "marcaEliminar.xhtml" actionListener = "#{demoBeanMarca.preparareliminar(item)}" style = "background-color: red; color:white; border-color: red; " icon = "pi pi-trash" / > < / p:column >
< / p:dataTable >
< / h:form >
< p:dialog id = "dialog" widgetVar = "dlg" width = "400" height = "300" modal = "true" >
< h:form class = "form-container" >
< h1 > < h:outputText value = "#{demoBeanMarca.titulo}" / > < / h1 >
< h:panelGrid id = "grid" columns = "3" style = "width: 100%" >
< p:outputLabel value = "Nombre:" for = "nombre" / >
< p:inputText id = "nombre" value = "#{demoBeanMarca.marca.nombre}" title = "Nombre" required = "true" requiredMessage = "Falta el campo Nombre." styleClass = "formulario-elemento; " / >
< p:message for = "nombre" / >
< p:outputLabel style = "font-weight:bolder;" value = "Proveedor:" for = "proveedorId" / >
< p:selectOneMenu id = "proveedorId" value = "#{demoBeanMarca.marca.proveedorId}" converter = "selectOneMenuConverter" >
< f:selectItems value = "#{demoBeanProveedor.all}" var = "item" itemLabel = "#{item.nombre}" itemValue = "#{item}" / >
< / p:selectOneMenu >
< / h:panelGrid >
< div >
< p:commandButton style = "margin-left: 10px; background-color:green; border-color:green; " icon = "pi pi-check" action = "#{demoBeanMarca.agregarMarca()}" update = "formtabla:tabla" ajax = "false" rendered = "#{demoBeanMarca.nuevo}" / >
< p:commandButton action = "marcaLista.xhtml" ajax = "false" actionListener = "#{demoBeanMarca.editarmarca()}" icon = "pi pi-check" style = "margin-left: 10px; background-color:green; border-color:green;" update = "formtabla:tabla" immediate = "true" rendered = "#{!demoBeanMarca.nuevo}" / >
< p:commandButton action = "marcaLista.xhtml" ajax = "false" icon = "pi pi-times" immediate = "true" style = "background-color: red; border-color:red;" / >
< / div >
< h1 > < h:outputText value = "#{demoBeanMarca.titulo}" / > < / h1 >
< h:panelGrid id = "grid" columns = "3" style = "width: 100%" >
< p:outputLabel value = "Nombre:" for = "nombre" / >
< p:inputText id = "nombre" value = "#{demoBeanMarca.marca.nombre}" title = "Nombre" required = "true" requiredMessage = "Falta el campo Nombre." styleClass = "formulario-elemento; " / >
< p:message for = "nombre" / >
< p:outputLabel style = "font-weight:bolder;" value = "Proveedor:" for = "proveedorId" / >
< p:selectOneMenu id = "proveedorId" value = "#{demoBeanMarca.marca.proveedorId}" converter = "selectOneMenuConverter" >
< f:selectItems value = "#{demoBeanProveedor.all}" var = "item" itemLabel = "#{item.nombre}" itemValue = "#{item}" / >
< / p:selectOneMenu >
< / h:panelGrid >
< div >
< p:commandButton style = "margin-left: 10px; background-color:green; border-color:green; " icon = "pi pi-check" action = "#{demoBeanMarca.agregarMarca()}" update = "formtabla:tabla" ajax = "false" rendered = "#{demoBeanMarca.nuevo}" / >
< p:commandButton action = "marcaLista.xhtml" ajax = "false" actionListener = "#{demoBeanMarca.editarmarca()}" icon = "pi pi-check" style = "margin-left: 10px; background-color:green; border-color:green;" update = "formtabla:tabla" immediate = "true" rendered = "#{!demoBeanMarca.nuevo}" / >
< p:commandButton action = "marcaLista.xhtml" ajax = "false" icon = "pi pi-times" immediate = "true" style = "background-color: red; border-color:red;" / >
< / div >
< / h:form >
< / p:dialog >
< / f:view >
< / ui:define >
< / ui:composition >
< / body >
< / html >