// call (necessary so two consecutive calls like we get during
// some startup scenarios don't result in the first url displaying
// rather than the second)
targetUrl_ = url;
RepeatingCommand navigateCommand = new RepeatingCommand() {
@Override
public boolean execute()
{
if (getIFrameEx() != null &&
getIFrameEx().getContentWindow() != null)
{
if (targetUrl_.equals(getUrl()))
{
getIFrameEx().getContentWindow().reload();
}
else
{
getIFrameEx().getContentWindow().replaceLocationHref(targetUrl_);
frame_.setUrl(targetUrl_);
}
return false;
}
else
{
return true;
}
}
};
if (navigateCommand.execute())
Scheduler.get().scheduleFixedDelay(navigateCommand, 100);
}