How soon the field focus can fire ?

There are 3 table in my form.
Relation is master(A)-detail(‘B’)-detail(C).
When focus in A table’s row 1,will query data into B then C…
Normally when use click everything is working find.
But if I use program to set focus in loop
It got wrong!
Sample code like this:
//program set focus loop condition
List p=new ArrayListM();
p.add(new Position(“A”,1,0));//Position(Table,rowIndex,columnIndex);
p.add(new Position(“B”,2,0));
p.add(new Position(“C”,1,0));

//loop to set field focus
for(Position p:vo.getLocation()){
//…got table from list
Table tb=tableList.get(p.tableId);
MyFactory fac=tb.getTableFieldFactory();
Field field=fac.getField(p);//got field from cache list
field.focus();
}

In this case I hope it should fire field focus 3 times.(A then B then C
But actually the vaadin eat sometimes.
I think the vaadin focus fire has time limit.
You can’t fire focus too fast.
Can someone help me to solve it ?
I am in this trouble for 2 weeks.
Thank you so much.

May be I had solve it by myself.
After time and time again trying.
PollListener is my answer.
In my case doing field.focus in every pollInterval.
like:
UI.getCurrent().setPollInterval(600);
UI.getCurrent().addPollListener(myPollListener);

PollListener myPollListener = new PollListener() {
    @Override
    public void poll(PollEvent event) {
         new SetPositionProcess().start();  <<here to set focus
    }
};

I don’t know that is good answer or not. but my problem is solved.
may be could save your life too!