Vaadin version: 7.6.3
Hi
I have main page with 4 grids and I want to add, modify the data via modal formLayot which is Window.
So, I click the button, appears the form, I add the data and close the window.
Close button has the code as follows:
Deposito produccion = new Deposito();
produccion.setFecha(txtFecha.getValue());
produccion.setPeso(Double.valueOf(txtPesoEntrada.getValue()));
produccion.setPeso_salida(Double.valueOf(txtPesoSalida.getValue()));
produccion.setOperario(operarioSelected.getEmpleado_apellido());
dao.save(produccion);
ui.refreshGridProduccion(); // ui is the mainpage, in fact a main class
the metod of refreshGridProduccion has:
final void refreshGridProduccion() {
gridProduccion.setContainerDataSource(new BeanItemContainer<>(Deposito.class, listaProduccion));
}
Done like this does not refresh the gridProduccion after closing the windos. I have to refresh the main page.
I tried to add data to the grid “diretly” from the main page instead of calling the form and this case, yes,
the grid was refreshed(updated).
So, I don’t understand what I’m doing wrong. Pleas, help mi out.
Thanks.
Aleksander