Plantillas Primefaces JSF
  • Introduction
  • Proyecto JEE
    • Introduccion
    • POSEIDON
    • Descomprimir template
    • Proyecto JEE
    • Dependencias
    • Sources
    • Ejecutar proyecto
    • TEMPLATE RESPONSIVE
    • Plantilla Bootfaces
      • Introduction
      • Plantilla
        • Clonar Template
        • Proyecto EJB
        • Proyecto Web
        • template base
        • top
        • footer.xhtml
        • Properties
        • Roles
        • Util
        • template base
        • page
  • Capitulo II. Crear EJB
    • MongoDB
    • Proyecto EJB
    • Dependencias
    • Paquetes
    • Provider
    • Entity
    • Repository
    • Converter
    • Services
    • Datamodel
  • Capitulo III. Configuracion
    • Paquetes
    • Util
    • Properties
    • Template
    • Footer
    • Logo
    • Componentes
  • Capitulo IV. Login
    • Dependencias ejb
    • Roles
    • ApplicationMenu
    • RolAdministrador
    • ValidadorRoles
    • LoginController
    • Login.xhtml
  • Capitulo V. Menu
    • Menu
  • Capitulo VI Controller
    • Controller Simple
    • Implementar IController
    • Colapsar Codigo
    • Atributos
    • GetPages
    • Init
    • Reset
    • Prepare
    • ShowAll
    • IsNew
    • Save
    • Edit
    • Delete
    • Print
    • handleSelected
    • Paginacion
    • Codigo Completo
  • Capitulo VII Formularios
    • Carpetas
    • list.xhtml
    • new
    • view
  • Capitulo X Referenciados y Embebidos
    • Referenciados
  • Plantilla Bootfaces
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Capitulo VII Formularios

new

Previouslist.xhtmlNextview

Last updated 6 years ago

Was this helpful?

Se invoca desde el list, dar enter al escribir el codigo de bodega

Se habilitan los atributos y el boton Guardar.

Codigo new.xhtml

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml"
                xmlns:avbravo="http://xmlns.jcp.org/jsf/composite/avbravo"
                xmlns:jsf="http://xmlns.jcp.org/jsf">
    <ui:define name="head">

    </ui:define>   
    <ui:define name="title">#{msg['titleview.bodega']}</ui:define>

    <ui:define name="viewname">#{msg['titleview.bodega']}</ui:define>


    <ui:define name="content">   
        <f:event listener="#{bodegaController.preRenderView('new')}" type="preRenderView"/>
        <h:form id="form" rendered="#{loginController.loggedIn and applicationMenu.bodega.query}" onkeypress="if (event.keyCode == 13) {
                    return false;
                }">   

            <h:panelGroup id="content" layout="block"> 
                <p:messages id="msgs" autoUpdate="true" closable="true"/>



                <div class="ui-g ui-fluid">
                    <!--<div class="ui-g-12 ui-lg-12">-->
                    <div class="ui-g-12 ui-lg-12">
                        <!-- Left Side -->


                        <div class="card card-w-title">
                            <h1>#{msg['titlelist.bodega']}</h1>

                            <avbravo:panelNew label="#{msg['field.idbodega']}"
                                              value="#{bodegaController.bodega.idbodega}"
                                              isnew="#{bodegaController.isNew()}"
                                              new="#{bodegaController.prepare('new',bodegaController.bodega)}"
                                              rendererList="#{applicationMenu.bodega.list}"
                                              list="#{bodegaController.prepare('golist',bodegaController.bodega)}"

                                              />




                            <p:panelGrid id="panel" rendered="#{bodegaController.writable}" columns="4" columnClasses="ui-grid-col-2,ui-grid-col-4,ui-grid-col-2,ui-grid-col-4" layout="grid" styleClass="ui-panelgrid-blank form-group" style="border:0px none; background-color:transparent;">     

                                <p:outputLabel  value="#{msg['field.direccion']}"/>
                                <avbravo:inputText  id="direccion"  value="#{bodegaController.bodega.direccion}"
                                                    text="#{msg['field.direccion']}" />

                                <p:outputLabel  value="#{msg['field.telefono']}"/>
                                <avbravo:inputText  id="telofono"  value="#{bodegaController.bodega.telefono}"
                                                    text="#{msg['field.telefono']}" />


                                <p:outputLabel  value="#{msg['field.activo']}" />
                                <avbravo:activo beanValue="#{bodegaController.bodega.activo}" rendered="#{bodegaController.writable}" />
                                <f:facet name="footer">
                                    <avbravo:buttonSave rendered="#{bodegaController.writable and applicationMenu.bodega.create}"
                                                        save="#{bodegaController.save()}"  />

                                </f:facet>
                            </p:panelGrid>
                        </div>

                    </div>

                </div>

            </h:panelGroup>
        </h:form>
        <avbravo:accesodenegado renderedcondition="#{!loginController.loggedIn or !applicationMenu.bodega.query}" />
    </ui:define>

</ui:composition>