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.
68 lines
4.6 KiB
68 lines
4.6 KiB
<?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/ejemploJazmin.xhtml">
|
|
|
|
<ui:define name="top">
|
|
top
|
|
</ui:define>
|
|
|
|
<ui:define name="left">
|
|
left
|
|
</ui:define>
|
|
|
|
<ui:define name="content">
|
|
<f:view>
|
|
|
|
<h:form>
|
|
<p:growl id="growl" showDetail="true" />
|
|
<h1><h:outputText value="Create/Edit"/></h1>
|
|
<p:panelGrid columns="2">
|
|
|
|
<p:outputLabel value="Usuario:" for="usuario" />
|
|
<p:inputText id="usuario" value="#{usuariosBean.usuario.usuario}" title="Usuario" required="true" requiredMessage="The Usuario field is required."/>
|
|
<p:outputLabel value="Password:" for="password" />
|
|
<p:inputText id="password" value="#{usuariosBean.usuario.password}" title="Password" required="true" requiredMessage="The Password field is required."/>
|
|
<p:outputLabel value="Nombre:" for="nombre" />
|
|
<p:inputText id="nombre" value="#{usuariosBean.usuario.nombre}" title="Nombre" required="true" requiredMessage="The Nombre field is required."/>
|
|
<p:outputLabel value="Apaterno:" for="apaterno" />
|
|
<p:inputText id="apaterno" value="#{usuariosBean.usuario.apaterno}" title="Apaterno" required="true" requiredMessage="The Apaterno field is required."/>
|
|
<p:outputLabel value="Amaterno:" for="amaterno" />
|
|
<p:inputText id="amaterno" value="#{usuariosBean.usuario.amaterno}" title="Amaterno" required="true" requiredMessage="The Amaterno field is required."/>
|
|
<p:outputLabel value="Domicilio:" for="domicilio" />
|
|
<p:inputText id="domicilio" value="#{usuariosBean.usuario.domicilio}" title="Domicilio" required="true" requiredMessage="The Domicilio field is required."/>
|
|
<p:outputLabel value="Telefono:" for="telefono" />
|
|
<p:inputText id="telefono" value="#{usuariosBean.usuario.telefono}" title="Telefono" required="true" requiredMessage="The Telefono field is required."/>
|
|
<p:outputLabel value="Fechanacimiento:" for="fechanacimiento" />
|
|
<p:inputMask id="fechanacimiento" value="#{usuariosBean.usuario.fechanacimiento}" mask="99/99/9999" required="true" >
|
|
<f:convertDateTime pattern="dd/MM/yyyy" />
|
|
</p:inputMask>
|
|
<p:outputLabel value="Tiposangre:" for="tiposangre" />
|
|
<p:inputText id="tiposangre" value="#{usuariosBean.usuario.tiposangre}" title="Tiposangre" required="true" requiredMessage="The Tiposangre field is required."/>
|
|
|
|
<p:outputLabel value="RolidRol:" for="rolidRol" />
|
|
<p:selectOneMenu id="rolidRol" value="#{usuariosBean.usuario.rolidRol}" required="true" converter="selectOneMenuConverter" requiredMessage="The RolidRol field is required.">
|
|
<!-- TODO: update below reference to list of available items-->
|
|
<f:selectItems value="#{rolBean.roles}" var="item" itemLabel="#{item.nombreRol}" itemValue="#{item}"/>
|
|
</p:selectOneMenu>
|
|
|
|
</p:panelGrid>
|
|
<p:commandButton styleClass="ui-button-raised ui-button-success" action ="#{usuariosBean.agregarUsuario()}" value="Agregar" update="growl" rendered="#{usuariosBean.nuevo}"/>
|
|
<p:commandButton action ="usuariosLista.xhtml" actionListener="#{usuariosBean.editarUsuario()}" value="Editar" update="growl" rendered="#{!usuariosBean.nuevo}" />
|
|
<p:commandButton styleClass="ui-button-raised ui-button-danger" action ="productosLista.xhtml" value="Cancelar" immediate="true"/>
|
|
</h:form>
|
|
</f:view>
|
|
|
|
</ui:define>
|
|
|
|
</ui:composition>
|
|
|
|
</body>
|
|
</html>
|
|
|