You only have a problem if you use GWT.runAsync in your method. If so,
everything that is inside the RunAsyncCallback.onSuccess method will be
downloaded as a separate javascript file once your app reaches this point.
The download will happen in parallel/async in production mode. In dev mode
No I assumed you call your model.setRecords() method inside the model()
method (because thats the only place where you can call it). So in my
example the call label.setText() would by the model.setRecords() call in
your example.
It has to be executed in order. Just imagine your anonymous
Maybe I don't get it right but in an entrypoint class:
@Override
public void onModuleLoad() {
System.out.println(onModuleLoad(): started);
Label label = new Label() {
@Override
public void setText(final String text) {
System.out.println(Label.setText(): + text);
super.setText(text);
}