Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/01/2008, 04:25
Izaro
 
Fecha de Ingreso: enero-2008
Mensajes: 5
Antigüedad: 16 años, 4 meses
Puntos: 0
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;
}