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