Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
Vaadin + Springboot + Thread= problem
I Create one click button, and in this click I do this:
private void buscarCaixas() {
BuscarCaixasPeriodo buscarCaixasPeriodo = new BuscarCaixasPeriodo();
progresso.setVisible(true);
progresso.setIndeterminate(true);
buscarCaixasPeriodo.start();
}
and this is my code from BuscarCaixasPeriodo:
public class BuscarCaixasPeriodo extends Thread
{
public void run()
{
UI.getCurrent().access(new Runnable() {
@Override
public void run() {
try{
caixasContainer =new BeanItemContainer<CaixaVO>(CaixaVO.class, caixas);
caixasList.setContainerDataSource(caixasContainer);
try{
caixasContainer.addAll(financeiroService.getCaixasByPeriodo(dtInicial.getValue(), dtFinal.getValue()));
caixasList.setPageLength(caixasContainer.size());
atualizarDashboard.setEnabled(true);
caixasList.setEnabled(true);
caixasList.setShowSelectAllButton(new ShowButton() {
@Override
public boolean isShow(String filter, int page) {
return true;
}
});
caixasList.focus();
}catch(Exception e){
Notification.show(e.getMessage(), Type.ERROR_MESSAGE);
}
}catch(Exception e){
Utils.showNotification(e.getMessage(), Type.ERROR_MESSAGE, UI.getCurrent().getPage());
}
progresso.setVisible(false);
progresso.setIndeterminate(false);
}
});
}
}
So when I click in button, my progress change to indeterminate, and execute my method, but he don`t back to my front until i click in another place (example in one combobox, ou anothr tab) If I wait for 5minutes, the server dont callback to my front.
anyone know why??
tks
Last updated on
Do you have push enabled? I.e., is your UI annotated with @Push?
Last updated on
You cannot reply to this thread.