I've to launch a Javascript function from Java only when all div are loaded into my VerticalPanel, otherwise my Javascript function will throw an exception because of the element is not yet in the page. How can I do?
This is my code:
@UiField VerticalPanel areaBody;
areaBody.addHandler(new MyLoadHandler(), LoadEvent.getType());
public class MyLoadHandler implements LoadHandler {
@Override
public void onLoad(LoadEvent event) {
// TODO Auto-generated method stub
Window.alert("onLoad");
}
}