![]() |
Netbeans 6.0: boton no entra en Action Hola! estoy desarrollando una aplicación web en netbeans 6.0. tengo un jsp donde genero una tabla de forma dinámica. Cojo los datos de una base de datos Oracle 10g y los muestro en una tabla que inserto en un control PanelGrid. el problema viene cuando incorporo un componente Button en mi página. Si hago click en ese botón no entra en la función Action del botón. Alguien sabe por qué ocurre esto y como se podría solucionar? Muchas gracias. |
Re: Netbeans 6.0: boton no entra en Action Para que quede más claro el problema que tengo os muestro mi código. Función donde cargo la tabla "tablaUsuarios", la cual la he incorporado en el formulario en tiempo de diseño: private void createTable() { //Create the Table Dynamically try { CachedRowSetXImpl myRowSet = new CachedRowSetXImpl(); myRowSet.setDataSourceName("java:comp/env/jdbc/smcDatasource"); myRowSet.setUsername("SYSTEM"); myRowSet.setPassword("smcIketek"); myRowSet.setCommand("SELECT username, pass, lastname, firstname, company, email FROM usuarios"); myRowSet.setTableName("USUARIOS"); myRowSet.execute(); CachedRowSetDataProvider myDataProvider = new CachedRowSetDataProvider(); myDataProvider.setCachedRowSet(myRowSet); FacesContext facesContext = FacesContext.getCurrentInstance(); Application application = facesContext.getApplication(); grupoUsuarios.setSourceData(myDataProvider); grupoUsuarios.setSourceVar("curRow"); textUserName.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(1)+"']}")); textPass.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(2)+"']}")); textLastName.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(3)+"']}")); textFirstName.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(4)+"']}")); textCompany.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(5)+"']}")); textEmail.setValueBinding("text", (ValueBinding)application.createValueBinding("#{cu rRow.value['"+myRowSet.getMetaData().getColumnName(6)+"']}")); } catch(Exception ex) { lblAviso.setText("Error: " + ex.getMessage()); } } Tengo el botón Agregar en el formulario, que también lo he incorporado al formulario el tiempo de diseño y esta es su función action, en la cual no consigo que entre: public String btoAgregar_action() { addRequest = true; return null; } |
| La zona horaria es GMT -6. Ahora son las 06:42. |
Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.