|
|
@ -105,13 +105,11 @@ public class ModernUIPane<T> extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void populate(final T t) { |
|
|
|
public void populate(final T t) { |
|
|
|
browser.addLoadListener(new LoadAdapter() { |
|
|
|
browser.addScriptContextListener(new ScriptContextAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onFinishLoadingFrame(FinishLoadingEvent event) { |
|
|
|
public void onScriptContextCreated(ScriptContextEvent event) { |
|
|
|
if (event.isMainFrame()) { |
|
|
|
JSValue ns = event.getBrowser().executeJavaScriptAndReturnValue("window." + namespace); |
|
|
|
JSValue ns = event.getBrowser().executeJavaScriptAndReturnValue("window." + namespace); |
|
|
|
ns.asObject().setProperty(variable, t); |
|
|
|
ns.asObject().setProperty(variable, t); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|