Reputation: 5351
I've errai's widget of HTMLElement
type. I would like to put into current page content from org.jboss.errai.ui.nav.client.local.Navigation
class as follow:
IsWidget widget = navigation.getContentPanel();
SimplePanel.add(IsWidget widget);
but in errai in html templates java file HTMLElement is used.
Upvotes: 0
Views: 252
Reputation: 35346
This is the proper way to this:
@Templated
@EntryPoint
public class App extends Composite {
@Inject
Navigation navigation;
@Inject @DataField
private SimplePanel content;
@PostConstruct
public void buildUI() {
content.add(navigation.getContentPanel());
RootPanel.get("rootPanel").add(this);
}
}
Having a template that looks like this:
<div>
<div id="content"></div>
</div>
Upvotes: 1