-
1. Re: Errai UI question
ddadlani Jan 14, 2015 12:05 PM (in response to hr.stoyanov)Hello Hristo,
Have you tried eliminating the template div by using <body id="template">? Does that work for you?
If not, you could try manually adding the sidebar. To do that you have to inject your sidebar as a separate bean and append it to your page as a child of the <div class="sidebar menu">.
That should do the trick.Cheers,
Divya -
2. Re: Errai UI question
hr.stoyanov Jan 14, 2015 12:26 PM (in response to ddadlani)Thanks Divya
I am able to insert the sidebar into the generated html with something like below. Now I need to get better control over the Errai "page manager", so I can insert my pages u den PUSHER div. Should I hack the root panel?
...
@EntryPoint
public class WebApp extends Composite {
@Inject
@DataField
protected Sidebar sidebar;
@AfterInitialization
public void afterInit() {
//We insert the sidebar as a first direct child element under BODY
BodyElement theBody = Document.get().getBody();
theBody.insertFirst(sidebar.getElement());
}
}
-
3. Re: Errai UI question
ddadlani Jan 14, 2015 12:44 PM (in response to hr.stoyanov)Yes. You can insert your pages into your content div (or PUSHER div) so that your pages are rendered within that div.
You'll need to inject your div as a panel (content, in this example), and then use this in your afterInit method:
content.add(navigation.getContentPanel()));
RootPanel.get().add(this);