Hi Isaac ! I was doing the things as you've just said . I was filling
a table inside onSuccess() method and it worked well ...
I was trying to separate things . What I was trying to do was :
public class DadosNovaRequisicao implements VerticalPanel{
private FlexTable tabela;
List listaProdutos;
public DadosNovaRequisicao(){
listaProdutos = new ArrayList();
tabela = new FlexTable();
loadPainelNovaRequisicao();
add(tabela);
}
public void loadPainelNovaRequisicao(){
listaProdutos=getListaDepartamentosProjectoFromBD();
inicializarTabela(listaProdutos); // this will iterate over
listaProdutos, filling the table "tabela"
}
}
I've tried to put the things simple, my code isn't so simples as that
but you got the idea . Only with one method I could fetch all the data
from server, iterating over it in order to fill two or three different
tables with different data ....
> You're not quite getting the "asynchronous callback" concept.
> onSuccess() won't be called until after
> getListaDepartamentosProjectoFromBD() has returned. You're just going
> to have to wait for onSuccess() to be called and use the list there.
>