The above code insert a row in a table and commits ii to the database BUT the problem is that the line
table.select(itemId);
is not working because it is a temporary itemId.The documentation said
"Implement QueryDelegate.RowIdChangeListener to receive the actual Row ID value after the addition has been committed. "
THIS WAS AN ERROR " table.select(item);" is NOT working I will try your example, Teppo.
I finded a partial solution like this:
Object itemId = table.addItem();
Item item = containerBindTotable.getItem(itemId);
container.getContainerProperty(itemId, "cedula").setValue(cedulaS);
try {
container.commit();
table.select(item); // this works, it is selected, BUT it doesnt scroll to it
catch (UnsupportedOperationException e) { //bla }
BUT there is a problem: supposed the table show 5 rows (lines) but have 10 rows, if I inserted one more, it is selected, BUT it doesnt automatically, the user have to scroll down until he/she find the row selected.