jmoordbjsf
  • Introduction
  • instalacion
  • Configurar jmoordb
    • Proyecto EJB
      • Entity
      • Repository
    • Proyecto Web
      • Controller
  • autocomplete
    • autocompleteWithCalendarDateTime
  • calendar
  • column
  • columnview
  • commandbuttonedit
    • commandbuttonedit
    • commandbuttonreturn
    • commandbuttonsave
  • template
    • csstemplate
    • jstemplate
    • metatemplate
  • date
  • toolbar
    • toolbarnew
    • toolbarnewsavereturn
    • toolbarview
    • toolbarnewdate
    • toolbarnewlowercase
    • toolbarsave
  • denegado
  • email
  • inputText
    • inputTextMeses
    • inputTextPago
    • inputTextPagoAutomatico
    • inputTextPagoAutomaticoSinSpan
    • inputTextPagoDialog
    • inputTextPagoPagare
  • label
    • labelDate
    • labelNumber
    • labelPago
    • labelPagoSinSpan
  • login
  • mesSelectOneMenu
  • messages
  • noyes
  • paginator
  • password
  • print
  • search
    • searchBetweenDate
    • searchDate
    • searchYesNo
  • selectOneMenu
  • sexo
  • view
  • yesno
  • schedule
    • cssschedule
    • jsschedule
  • Formularios
    • new.xhtml
      • Por llave primaria
      • Por otro atributo
      • Sin campo de validacion
    • view.xhtml
      • Rol view.xhtml
    • list.xthml
      • Rol list.xhtml
  • Controller
    • RolController.java con todos metodos implementados
    • save()
    • FacultadController.java
    • Metodos
    • isNew()
    • @Aspect
    • delete
    • init()
    • move()
  • Development
    • Clases como parametros y metodos en el composite
    • Crear composite distribuible con Maven
    • Agregar css
Powered by GitBook
On this page

Was this helpful?

  1. Formularios
  2. new.xhtml

Por llave primaria

Previousnew.xhtmlNextPor otro atributo

Last updated 6 years ago

Was this helpful?

Rol

  • Formulario simple con una llave primaria para usarse en el <jmmordb:toolbarnew>

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<ui:composition template="/layout/template.xhtml" 
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:b="http://bootsfaces.net/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:jmoordbjsf="http://jmoordbjsf.com/taglib"> 
    <ui:define name="content">
        <!--<h:outputStylesheet library="bsf" name="css/thumbnails.css"/>-->

        <style>
            .thumbnail { max-width: 100%; }
            img.thumbnail:hover, img.thumbnail:focus {
                border: 1px solid;
                border-color: #428BCA;
            }
        </style>

        <b:form id="form"  prependId="false"  rendered="#{loginController.loggedIn and applicationMenu.sugerencia.create}" onkeypress="if (event.keyCode == 13) {
                     return false;
                 }">
            <h:panelGroup id="content" layout="block"> 

                <jmoordbjsf:messages id="msg"/>
                <jmoordbjsf:toolbarnew label="#{msg['field.idsugerencia']}"
                                       title="#{msg['titleview.sugerencia']}"
                                       value="#{sugerenciaController.sugerencia.idsugerencia}"
                                       isnew="#{sugerenciaController.isNew()}"
                                       disabled="#{sugerenciaController.writable}"
                                       new="#{sugerenciaController.prepare('new',sugerenciaController.sugerencia)}"
                                       rendererList="#{applicationMenu.sugerencia.list}"
                                       list="#{sugerenciaController.prepare('golist',sugerenciaController.sugerencia)}"

                                       />
                <b:panel title="#{app['title.data']}" look="primary" rendered="#{sugerenciaController.writable}">



                    <b:panelGrid id="panel" colSpans="2,10" size="xs" rendered="#{sugerenciaController.writable}"> 

                        <p:outputLabel  value="#{msg['field.descripcion']}" />
                        <b:inputTextarea rows="2" span="8" value="#{sugerenciaController.sugerencia.descripcion}" id="descripcion"  />

                        <p:outputLabel  value="#{msg['field.activo']}" />
                        <jmoordbjsf:yesno value="#{sugerenciaController.sugerencia.activo}" id="activo"  required="true"/>

                        <jmoordbjsf:save rendered="#{sugerenciaController.writable and applicationMenu.sugerencia.create}"
                                         save="#{sugerenciaController.save()}" />


                    </b:panelGrid>


                </b:panel>
            </h:panelGroup>
        </b:form>
        <jmoordbjsf:denegado renderedcondition="#{!loginController.loggedIn or !applicationMenu.sugerencia.create}" />

        <br/><br/><br/>
    </ui:define>
</ui:composition>