appendRow

Hi,

I have a button to add lines in a table, it磗 working, but I would like to set a value to a field after a line is created. I磛e used the setValue property, but nothing happens. Anybody can help me ? Here is the code i磎 using. Both fields don磘 change their values.

try {

RowKey rk = ca_assuntosDataProvider1.appendRow();

ca_assuntosDataProvider1.setCursorRow(rk);

String s = new String("S");

ca_assuntosDataProvider1.setValue("CA_ASSUNTOS.MUNI_COD_MUNICIPIO", new Integer(1));

("CA_ASSUNTOS.ASSU_STA_ATIVO", rk, s);

ca_assuntosDataProvider1.refresh();

} catch (Exception ex) {

log("Error Description", ex);

error(ex.getMessage());

}

tks a lot

[729 byte] By [Marcelo_Batalhaa] at [2007-11-26 16:07:22]
# 1
Hi!Try to call commitChages() before call refresh().Thanks,Roman.
-Grif-a at 2007-7-8 22:29:38 > top of Java-index,Development Tools,Java Tools...
# 2
if the rowset is in the sessionbean try just remove the refresh()The second setValue... is a typo? >("CA_ASSUNTOS.ASSU_STA_ATIVO", rk, s);
yossariana at 2007-7-8 22:29:38 > top of Java-index,Development Tools,Java Tools...