From what I read, the setting of the theme for an application is done only in the EntryPoint class (in onModuleLoad()). I tried setting it in other places, but it had no effect.
Is there any way I can set it somewhere else except the EntryPoint? Because I am loading some user preferences and the loading does not take place in the EntryPoint.
Thanks i开发者_StackOverflow社区n advance
As example you may download page content manualy and set this in to HtmlContainer.
htmlContainer = new HtmlContainer("");
ContentPanel cp = new ContentPanel();
cp.add(htmlContainer);
scrollPanel = new ScrollPanel();
scrollPanel.add(cp);
add(scrollPanel);
public void handleEvent(GridEvent e) {
someService.getPageContent("someUrl",
new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(String result) {
htmlContainer.setHtml(result);
}
});
}
精彩评论