xhtml中缺少属性会在调用时影响方法,并且无法正常工作

时间:2016-10-22 21:52:43

标签: java oracle

调用基本插入方法时遇到一些问题。当它进入方法时,它会在try和catch中死掉,而不会在我的数据库中插入任何内容。还注意到属性required =“true”似乎不起作用。

这是我目前的代码:

                        <!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://java.sun.com/jsf/facelets"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:p="http://primefaces.org/ui">

                  <ui:include src="common/timeout.xhtml" />

            <h:head>
              <meta charset="utf-8"></meta>
              <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
              <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"></meta>

            </h:head>
            <h:body >

                      <!-- Botonera --> 
                 <div id="botones">    
                   <p:commandButton id="btnIn" action="#{prueba.guardar}" update="growl" icon="fa fa-floppy-o text-info" />
                 </div>

                 <!-- Ajax loader -->       
                 <div class="pull-right" style="margin-top: -40px; margin-right:5px;">                
                 <ui:include src="common/loader.xhtml"/>
                 </div>
                 <!-- Mensaje -->
                 <p:messages globalOnly="true" id="growl" closable="true" showIcon="true" style="margin-left:5px; margin-right:5px;"/>

                    <div class="row">
                    <div class="col-lg-4 col-md-4 col-sm-4">  
                     <p:inputText id="codigo" maxlength="50" required="true" requiredMessage="#{bd.getMessage('htmlvalidate')}" value="#{prueba.codigo}"/>
                     <p:watermark for="codigo" value="#{msg.sgc001cod}" />
                     <p:spacer height="1"/>
                     <p:message for="codigo"/>  
                     <p:inputText id="desc" maxlength="100" required="true" requiredMessage="#{bd.getMessage('htmlvalidate')}" value="#{prueba.desc}"/>
                     <p:watermark for="desc" value="#{msg.sgc001des}" />
                     <p:spacer height="1"/>
                     <p:message for="desc"/>     
                    </div>
                    </div>
                    <h:inputHidden id="vop" value="#{prueba.validarOperacion}"/>

            </h:body>
            </html>

和我的BEAN(已恢复):

                            package org.enlacerh.util;

                /*
                 * To change this template, choose Tools | Templates
                 * and open the template in the editor.
                 */
                import javax.annotation.PostConstruct;
                import javax.faces.application.FacesMessage;
                import javax.faces.bean.ManagedBean;
                import javax.faces.bean.ViewScoped;
                import javax.faces.context.FacesContext;
                import javax.naming.Context;
                import javax.naming.InitialContext;
                import javax.naming.NamingException;
                import javax.sql.DataSource;

                import org.enlacerh.util.PntGenerica;

                import java.io.Serializable;
                import java.sql.Connection;
                import java.sql.PreparedStatement;
                import java.sql.ResultSet;
                import java.sql.SQLException;

                import org.primefaces.model.LazyDataModel;

                /**
                 *
                 * @author Mauricio
                 */
                @ManagedBean
                @ViewScoped
                public class Prueba extends Bd implements Serializable {

                /**
                     * 
                     */
                    private static final long serialVersionUID = 1L;

                    private LazyDataModel<Prueba> lazyModel;  


                    /**
                     * @return the lazyModel
                     */
                    public LazyDataModel<Prueba> getLazyModel() {
                        return lazyModel;
                    }   

                @PostConstruct
                public void init() {
                    System.out.println("entre al metodo INIT");
                    System.out.println("Usuario: " + login.toUpperCase());
                    lazyModel  = new LazyDataModel<Prueba>(){
                        /**
                         * 
                         */
                        private static final long serialVersionUID = 7217573531435419432L;

                    };
                }

                    private String codigo = "";
                    private String desc = "";
                    private int validarOperacion = 0;
                    private String zcodigo = "";
                    private String zdesc = "";

                    public String getCodigo() {
                        return codigo;
                    }

                    public void setCodigo(String codigo) {
                        this.codigo = codigo;
                    }

                    public String getDesc() {
                        return desc;
                    }

                    public void setDesc(String desc) {
                        this.desc = desc;
                    }

                    public String getZcodigo() {
                        return zcodigo;
                    }

                    public void setZcodigo(String zcodigo) {
                        this.zcodigo = zcodigo;
                    }

                    public String getZdesc() {
                        return zdesc;
                    }

                    public void setZdesc(String zdesc) {
                        this.zdesc = zdesc;
                    }

                    /**
                     * @return the validarOperacion
                     */
                    public int getValidarOperacion() {
                        return validarOperacion;
                    }
                    /**
                     * @param validarOperacion the validarOperacion to set
                     */
                    public void setValidarOperacion(int validarOperacion) {
                        this.validarOperacion = validarOperacion;
                    }

                    //Formateador de la fecha sdfecha
                    //java.text.SimpleDateFormat sdfecha = new java.text.SimpleDateFormat("dd/MM/yyyy", locale);
                    //String fecha = sdfecha.format(fecact); //Fecha formateada para insertar en tablas


                    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                //Variables seran utilizadas para capturar mensajes de errores de Oracle y parametros de metodos
                    FacesMessage msj = null;
                    PntGenerica consulta1 = new PntGenerica();
                    boolean vGacc; //Validador de opciones del menú
                    //private int rows1; //Registros de tabla oracle
                    private String login = (String) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("usuario"); //Usuario logeado
                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


                    //Coneccion a base de datos
                    //Pool de conecciones JNDI
                        Connection con;
                        PreparedStatement pstmt = null;
                        ResultSet r;


                /**
                 * Inserta categoria1.
                 * <p>
                 * <b>Parametros del Metodo:<b> String codcat1, String descat1 unidos como un solo string.<br>
                 * String pool, String login.<br><br>
                 **/
                public void insert() throws  NamingException {      
                    System.out.println("entre al metodo INSERT");   
                    try {
                        Context initContext = new InitialContext();     
                        DataSource ds = (DataSource) initContext.lookup(JNDI);
                        con = ds.getConnection();

                        String query = "INSERT INTO PRUEBA1 VALUES (?,?,?,'" + getFecha() + "',?,'" + getFecha() + "')";
                        pstmt = con.prepareStatement(query);
                        pstmt.setString(1, codigo.toUpperCase());
                        pstmt.setString(2, desc.toUpperCase());
                        pstmt.setString(3, login);
                        pstmt.setString(4, login);            

                        System.out.println(query);
                        System.out.println("codigo: " + codigo);
                        System.out.println("desc: " + desc);

                        try {
                            System.out.println("entre al try");
                            //Avisando
                            pstmt.executeUpdate();
                            msj = new FacesMessage(FacesMessage.SEVERITY_INFO, getMessage("msnInsert"), "");
                            limpiarValores();                
                         } catch (SQLException e)  {
                            System.out.println("entre al catch");
                            msj = new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), "");
                        }

                        pstmt.close();
                        con.close();
                    } catch (Exception e) {
                        e.printStackTrace();
                    }   
                    FacesContext.getCurrentInstance().addMessage(null, msj);
                }



                    public void guardar() throws NamingException, SQLException{     
                        if(validarOperacion==0){
                            System.out.println("entre al metodo guardar");
                            insert();
                        } else {
                            System.out.println("entre al metodo update");
                            //update();
                        }
                    }

                    private void limpiarValores() {
                        // TODO Auto-generated method stub
                        codigo = "";
                        desc = "";
                        validarOperacion = 0;
                    }

                }

以下是我从System.out.println看到的消息:

entre al metodo guardar entre al metodo INSERT INTO PRUEBA1 VALUES(?,?,?,'22 / oct / 2016',?,'22 / oct / 2016',?) codigo: 说明: 尝试一下 entre al catch

当我点击“GUARDAR”按钮时,我收到: ORA-01400:无法插入NULL(“OPENBIZVIEW”。“PRUEBA1”。“CODIGO”)

显然它没有正确接收值,所以即使我在两个文本输入中都插入了值,它也会变为空。

我也在控制台上看到此消息:

oct 25,2016 3:35:42 PM com.sun.faces.context.ExternalContextImpl getMimeType ADVERTENCIA:JSF1091:no se haencontradoingúntotoMIME para el archivo fa / fontawesome-webfont.woff2。 Para resolverlo,agregueunaasignacióndetipo MIME al archivo web.xml delaaplicación。

1 个答案:

答案 0 :(得分:0)

所以我不知道我做了什么......但它现在正在运作......

这是我的实际xhtml:

            <!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://java.sun.com/jsf/facelets"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:c="http://java.sun.com/jsp/jstl/core"
                  xmlns:p="http://primefaces.org/ui">
                  <script src="../plugins/jQuery/jQuery-2.2.0.min.js"></script>
                  <ui:include src="common/timeout.xhtml" />

            <h:head>
              <meta charset="utf-8"></meta>
              <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
              <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"></meta>
              <title>AdminLTE 2 | Data Tables</title>

              <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"></link>
              <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"></link>
              <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css"></link>
              <link rel="stylesheet" href="../plugins/datatables/dataTables.bootstrap.css"></link>
              <link rel="stylesheet" href="../dist/css/AdminLTE.min.css"></link>
              <link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css"></link>

              <script src="../bootstrap/js/bootstrap.min.js"></script>
              <script src="../plugins/datatables/jquery.dataTables.min.js"></script>
              <script src="../plugins/datatables/dataTables.bootstrap.min.js"></script>
              <script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
              <script src="../plugins/fastclick/fastclick.js"></script>
              <script src="../dist/js/app.min.js"></script>
              <script src="../dist/js/demo.js"></script>

            </h:head>
            <h:body class="hold-transition skin-blue sidebar-mini">
                <f:loadBundle basename="org.enlacerh.util.MessagesBundle_es_VEN" var="msg"/> 

            <div id="wrapper" class="wrapper">         
             <header class="main-header">
                <!-- Logo -->
                <a href="index.xhtml" class="logo">
                  <!-- mini logo for sidebar mini 50x50 pixels -->
                  <span class="logo-mini"><b>E</b>RH</span>
                  <!-- logo for regular state and mobile devices -->
                  <span class="logo-lg"><b>Enlace</b>RH</span>
                </a>
                <!-- Header Navbar: style can be found in header.less -->
                <nav class="navbar navbar-static-top">
                  <!-- Sidebar toggle button-->
                  <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                  </a>

                  <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                      <!-- Messages: style can be found in dropdown.less-->
                      <li class="dropdown messages-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                          <i class="fa fa-envelope-o"></i>
                          <span class="label label-success">4</span>
                        </a>
                        <ul class="dropdown-menu">
                          <li class="header">You have 4 messages</li>
                          <li>
                            <!-- inner menu: contains the actual data -->
                            <ul class="menu">
                              <li><!-- start message -->
                                <a href="#">
                                  <div class="pull-left">
                                    <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image"></img>
                                  </div>
                                  <h4>
                                    Support Team
                                    <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                  </h4>
                                  <p>Why not buy a new awesome theme?</p>
                                </a>
                              </li>
                              <!-- end message -->
                              <li>
                                <a href="#">
                                  <div class="pull-left">
                                    <img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image"></img>
                                  </div>
                                  <h4>
                                    EnlaceRH Design Team
                                    <small><i class="fa fa-clock-o"></i> 2 hours</small>
                                  </h4>
                                  <p>Why not buy a new awesome theme?</p>
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <div class="pull-left">
                                    <img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image"></img>
                                  </div>
                                  <h4>
                                    Developers
                                    <small><i class="fa fa-clock-o"></i> Today</small>
                                  </h4>
                                  <p>Why not buy a new awesome theme?</p>
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <div class="pull-left">
                                    <img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image"></img>
                                  </div>
                                  <h4>
                                    Sales Department
                                    <small><i class="fa fa-clock-o"></i> Yesterday</small>
                                  </h4>
                                  <p>Why not buy a new awesome theme?</p>
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <div class="pull-left">
                                    <img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image"></img>
                                  </div>
                                  <h4>
                                    Reviewers
                                    <small><i class="fa fa-clock-o"></i> 2 days</small>
                                  </h4>
                                  <p>Why not buy a new awesome theme?</p>
                                </a>
                              </li>
                            </ul>
                          </li>
                          <li class="footer"><a href="#">See All Messages</a></li>
                        </ul>
                      </li>
                      <!-- Notifications: style can be found in dropdown.less -->
                      <li class="dropdown notifications-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                          <i class="fa fa-bell-o"></i>
                          <span class="label label-warning">10</span>
                        </a>
                        <ul class="dropdown-menu">
                          <li class="header">You have 10 notifications</li>
                          <li>
                            <!-- inner menu: contains the actual data -->
                            <ul class="menu">
                              <li>
                                <a href="#">
                                  <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                                  page and may cause design problems
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <i class="fa fa-users text-red"></i> 5 new members joined
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                                </a>
                              </li>
                              <li>
                                <a href="#">
                                  <i class="fa fa-user text-red"></i> You changed your username
                                </a>
                              </li>
                            </ul>
                          </li>
                          <li class="footer"><a href="#">View all</a></li>
                        </ul>
                      </li>
                      <!-- Tasks: style can be found in dropdown.less -->
                      <li class="dropdown tasks-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                          <i class="fa fa-flag-o"></i>
                          <span class="label label-danger">9</span>
                        </a>
                        <ul class="dropdown-menu">
                          <li class="header">You have 9 tasks</li>
                          <li>
                            <!-- inner menu: contains the actual data -->
                            <ul class="menu">
                              <li><!-- Task item -->
                                <a href="#">
                                  <h3>
                                    Design some buttons
                                    <small class="pull-right">20%</small>
                                  </h3>
                                  <div class="progress xs">
                                    <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                      <span class="sr-only">20% Complete</span>
                                    </div>
                                  </div>
                                </a>
                              </li>
                              <!-- end task item -->
                              <li><!-- Task item -->
                                <a href="#">
                                  <h3>
                                    Create a nice theme
                                    <small class="pull-right">40%</small>
                                  </h3>
                                  <div class="progress xs">
                                    <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                      <span class="sr-only">40% Complete</span>
                                    </div>
                                  </div>
                                </a>
                              </li>
                              <!-- end task item -->
                              <li><!-- Task item -->
                                <a href="#">
                                  <h3>
                                    Some task I need to do
                                    <small class="pull-right">60%</small>
                                  </h3>
                                  <div class="progress xs">
                                    <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                      <span class="sr-only">60% Complete</span>
                                    </div>
                                  </div>
                                </a>
                              </li>
                              <!-- end task item -->
                              <li><!-- Task item -->
                                <a href="#">
                                  <h3>
                                    Make beautiful transitions
                                    <small class="pull-right">80%</small>
                                  </h3>
                                  <div class="progress xs">
                                    <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                      <span class="sr-only">80% Complete</span>
                                    </div>
                                  </div>
                                </a>
                              </li>
                              <!-- end task item -->
                            </ul>
                          </li>
                          <li class="footer">
                            <a href="#">View all tasks</a>
                          </li>
                        </ul>
                      </li>
                      <!-- User Account: style can be found in dropdown.less -->
                      <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                          <img src="../resources/img/work_photo.jpg" class="user-image" alt="User Image"></img>
                          <span class="hidden-xs"><strong>#{loginBean.getLogged()}</strong><span class="caret"></span></span>
                        </a>
                        <ul class="dropdown-menu">
                          <!-- User image -->
                          <li class="user-header">
                            <img src="../resources/img/work_photo.jpg" class="img-circle" alt="User Image"></img>

                            <p>
                              <span class="hidden-xs">#{loginBean.getLogged()}</span> - Web app Developer
                              <small>Member since Oct. 2016</small>
                            </p>
                          </li>
                          <!-- Menu Body -->
                          <li class="user-body">
                            <div class="row">
                              <div class="col-xs-4 text-center">
                                <a href="#">Followers</a>
                              </div>
                              <div class="col-xs-4 text-center">
                                <a href="#">Sales</a>
                              </div>
                              <div class="col-xs-4 text-center">
                                <a href="#">Friends</a>
                              </div>
                            </div>
                            <!-- /.row -->
                          </li>
                          <!-- Menu Footer-->
                          <li class="user-footer">
                            <div class="pull-left">
                              <a href="#" class="btn btn-default btn-flat">Profile</a>
                            </div>
                            <div class="pull-right">              
                              <p:commandLink actionListener="#{loginBean.logout}" styleClass="btn btn-default btn-flat" title="#{msg.salir}">#{msg.salir}</p:commandLink>   
                            </div>
                          </li>
                        </ul>
                      </li>
                      <!-- Control Sidebar Toggle Button -->
                      <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                      </li>
                    </ul>
                  </div>
                </nav>
              </header>


              <aside class="main-sidebar">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                  <!-- Sidebar user panel -->
                  <div class="user-panel">
                    <div class="pull-left image">
                      <img src="../resources/img/work_photo.jpg" class="img-circle" alt="User Image"></img>
                    </div>
                    <div class="pull-left info">
                     <p><span class="hidden-xs">#{loginBean.getLogged()}</span></p>
                      <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                    </div>
                  </div>
                  <!-- search form -->
                  <h:form action="#" class="sidebar-form">
                    <div class="input-group">
                      <input type="text" name="q" class="form-control" placeholder="Search..."></input>
                          <span class="input-group-btn">
                            <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                            </button>
                          </span>
                    </div>
                  </h:form>
                  <!-- /.search form -->
                  <!-- sidebar menu: : style can be found in sidebar.less -->
                  <ul class="sidebar-menu">
                    <li class="header">MAIN NAVIGATION</li>
                    <li class="treeview">
                      <a href="#">
                        <i class="fa fa-table"></i> <span>Tables</span>
                        <i class="fa fa-angle-left pull-right"></i>
                      </a>
                      <ul class="treeview-menu">
                        <li><a href="data.xhtml"><i class="fa fa-circle-o"></i> Data tables</a></li>
                      </ul>
                    </li>
                  </ul>
                </section>
                    <!-- /.sidebar -->
              </aside>


                    <!-- Page Content --> 

                 <div class="content-wrapper">

                 <!-- Content Header (Page header) -->
                <section class="content-header">
                  <h1>
                    Data Tables
                    <small>advanced tables</small>
                  </h1>
                  <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li><a href="#">Tables</a></li>
                    <li class="active">Data tables</li>
                  </ol>
                </section>

                 <h:form id="formprueba"  >

                  <!-- Botonera --> 
                 <div id="botones" class="content-header" >     
                   <p:commandButton update="panel, growl" accesskey="i" id="btnIn" action="#{prueba.guardar}" 
                    rendered="#{smnubean.opcbot('1')}" value="#{msg.htmlguardar}" title="#{msg.htmlg}" icon="fa fa-floppy-o text-info"/>
                   <p:commandButton accesskey="r" id="btnEl" onclick="modalDelete();" 
                    rendered="#{smnubean.opcbot('2')}" value="#{msg.htmlborrar}" icon="fa fa-trash text-info" title="#{msg.htmle}" />
                   <p:commandButton icon="fa fa-refresh text-info" update="panel, growl" process="@this"
                    title="#{msg.htmlr}" accesskey="l">  
                   <p:resetInput target="panel" />
                   </p:commandButton>                     
                 </div>

                 <!-- Ajax loader -->       
                 <div class="pull-right" style="margin-top: -40px; margin-right:5px;">                
                 <ui:include src="common/loader.xhtml"/>
                 </div>
                 <!-- Mensaje -->
                 <p:messages globalOnly="true" id="growl" closable="true" showIcon="true" style="margin-left:2%; margin-right:2%;"/>

                  <!-- Modal -->
                        <div class="modal fade" id="myModalDelete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                          <div class="modal-dialog">
                            <div class="modal-content">
                              <div class="modal-header bg-warning">
                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                <h4 class="modal-title" id="myModalLabel"><b>#{msg.html32}</b></h4>
                              </div>
                              <div class="modal-body">
                               <center style="font-size: 14px">#{msg.html31}</center>
                              </div>
                              <div class="modal-footer">
                                <p:commandLink  action="#{prueba.delete}"  styleClass="btn btn-md btn-info" value="#{msg.htmlborrar}" immediate="true" update="growl" accesskey="r" onclick="modalHide()"/>
                                <p:spacer height="5"/>
                                <p:commandLink  styleClass="btn btn-md btn-info" value="#{msg.html48}" immediate="true" update="growl" onclick="modalHide()"/>
                               </div>
                            </div>
                          </div>
                        </div>  


                   <!-- Panel -->      
                 <div class="panel panel-info" style="margin-top:1%; margin-left:2%; margin-right:2%;">
                 <div class="panel-body" >
                 <p:panel id="panel" widgetVar="panelwv" header="#{msg.Sgc005tit}" toggleable="true" collapsed="false" style="margin-top:1%; margin-left:1%; margin-right:1%;">   
                     <div class="row">
                     <div class="col-lg-4 col-md-4 col-sm-4">  
                            <p:inputText id="codigo" style="margin-bottom:3px; margin-top:3px; width:200px; height:45px;" maxlength="50" required="true" requiredMessage="#{bd.getMessage('htmlvalidate')}" value="#{prueba.codigo}"/>
                            <p:watermark for="codigo" value="#{msg.sgc001cod}" />
                            <p:spacer height="1"/>
                            <p:message for="codigo"/>   
                            <p:inputText id="desc" style="margin-bottom:3px; margin-top:3px; width:200px; height:45px;" maxlength="100" required="true" requiredMessage="#{bd.getMessage('htmlvalidate')}" value="#{prueba.desc}"/>
                            <p:watermark for="desc" value="#{msg.sgc001des}" />
                            <p:spacer height="1"/>
                            <p:message for="desc"/>       
                    </div>
                    </div>
                    <h:inputHidden id="vop" value="#{prueba.validarOperacion}"/>
                   </p:panel> 
                 </div>
                 </div>      
                   </h:form>                
              </div>


               <!-- Control Sidebar -->
              <aside class="control-sidebar control-sidebar-dark">
                <!-- Create the tabs -->
                <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
                  <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
                  <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content">
                  <!-- Home tab content -->
                  <div class="tab-pane" id="control-sidebar-home-tab">
                    <h3 class="control-sidebar-heading">Recent Activity</h3>
                    <ul class="control-sidebar-menu">
                      <li>
                        <a href="javascript:void(0)">
                          <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                          <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                            <p>Will be 23 on April 24th</p>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <i class="menu-icon fa fa-user bg-yellow"></i>

                          <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>

                            <p>New phone +1(800)555-1234</p>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

                          <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>

                            <p>nora@example.com</p>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <i class="menu-icon fa fa-file-code-o bg-green"></i>

                          <div class="menu-info">
                            <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>

                            <p>Execution time 5 seconds</p>
                          </div>
                        </a>
                      </li>
                    </ul>
                    <!-- /.control-sidebar-menu -->

                    <h3 class="control-sidebar-heading">Tasks Progress</h3>
                    <ul class="control-sidebar-menu">
                      <li>
                        <a href="javascript:void(0)">
                          <h4 class="control-sidebar-subheading">
                            Custom Template Design
                            <span class="label label-danger pull-right">70%</span>
                          </h4>

                          <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <h4 class="control-sidebar-subheading">
                            Update Resume
                            <span class="label label-success pull-right">95%</span>
                          </h4>

                          <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-success" style="width: 95%"></div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <h4 class="control-sidebar-subheading">
                            Laravel Integration
                            <span class="label label-warning pull-right">50%</span>
                          </h4>

                          <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a href="javascript:void(0)">
                          <h4 class="control-sidebar-subheading">
                            Back End Framework
                            <span class="label label-primary pull-right">68%</span>
                          </h4>

                          <div class="progress progress-xxs">
                            <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
                          </div>
                        </a>
                      </li>
                    </ul>
                    <!-- /.control-sidebar-menu -->

                  </div>
                  <!-- /.tab-pane -->
                  <!-- Stats tab content -->
                  <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
                  <!-- /.tab-pane -->
                  <!-- Settings tab content -->
                  <div class="tab-pane" id="control-sidebar-settings-tab">
                    <h:form >
                      <h3 class="control-sidebar-heading">General Settings</h3>

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Report panel usage
                          <input type="checkbox" class="pull-right"></input>
                        </label>

                        <p>
                          Some information about this general settings option
                        </p>
                      </div>
                      <!-- /.form-group -->

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Allow mail redirect
                          <input type="checkbox" class="pull-right"></input>
                        </label>

                        <p>
                          Other sets of options are available
                        </p>
                      </div>
                      <!-- /.form-group -->

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Expose author name in posts
                          <input type="checkbox" class="pull-right"></input>
                        </label>

                        <p>
                          Allow the user to show his name in blog posts
                        </p>
                      </div>
                      <!-- /.form-group -->

                      <h3 class="control-sidebar-heading">Chat Settings</h3>

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Show me as online
                          <input type="checkbox" class="pull-right"></input>
                        </label>
                      </div>
                      <!-- /.form-group -->

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Turn off notifications
                          <input type="checkbox" class="pull-right"></input>
                        </label>
                      </div>
                      <!-- /.form-group -->

                      <div class="form-group">
                        <label class="control-sidebar-subheading">
                          Delete chat history
                          <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
                        </label>
                      </div>
                      <!-- /.form-group -->
                    </h:form>
                  </div>
                  <!-- /.tab-pane -->
                </div>
              </aside>

                <!-- /.control-sidebar -->
              <!-- Add the sidebar's background. This div must be placed
                   immediately after the control sidebar -->
              <div class="control-sidebar-bg"></div>

            </div>

            </h:body>
            </html>

BEAN保持不变。

感谢所有事情。