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

view

PreviousnewNextReferenciados

Last updated 6 years ago

Was this helpful?

Permite editar, imprimir y eliminar registros.

Codigo completo view.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">    
        <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" />

                <p:remoteCommand  update=":form:content"
                                  name="remoteid" actionListener="#{bodegaController.isNew()}"/>

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


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


                            <p:panelGrid columns="2" rendered="#{bodegaController.writable}" 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.idbodega']}"/>
                                <p:outputLabel value="#{bodegaController.bodega.idbodega}"/>        
                            </p:panelGrid>


                            <p:panelGrid columns="4" rendered="#{bodegaController.writable}" 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="telefono"  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:buttonFooter
                                        renderedDelete="#{applicationMenu.bodega.delete}"
                                        renderedEdit="#{applicationMenu.bodega.edit}" 
                                        renderedList="#{applicationMenu.bodega.list}"
                                        edit="#{bodegaController.edit()}"
                                        delete="#{bodegaController.delete(bodegaController.bodega,true)}"
                                        print="#{bodegaController.print()}"
                                        url="#{bodegaController.prepare('golist',bodegaController.bodega)}"
                                        />


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




                        </div>



                    </div>


                </div>
                <p:confirmDialog  global="true" showEffect="fade" hideEffect="explode">
                    <p:commandButton  class="btnn btnn-primary" value="#{app['button.yes']}" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
                    <p:commandButton class="btnn btnn-primary" value="#{app['button.no']}" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                </p:confirmDialog>
            </h:panelGroup>
        </h:form>
        <avbravo:accesodenegado renderedcondition="#{!loginController.loggedIn or !applicationMenu.bodega.query}" />
    </ui:define>

</ui:composition>