Retroceder   Foros del Web > Programación para sitios web > Java y JSP

Respuesta
 
Herramientas Desplegado
Antiguo 11-ene-2008, 00:54   #1 (permalink)
Izaro ha deshabilitado el karma
 
Fecha de Ingreso: enero-2008
Mensajes: 5
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.
Izaro está desconectado   Responder Citando
Antiguo 11-ene-2008, 03:25   #2 (permalink)
Izaro ha deshabilitado el karma
 
Fecha de Ingreso: enero-2008
Mensajes: 5
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;
}
Izaro está desconectado   Responder Citando
Respuesta

No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Desactivado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 05:44.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93