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