@Theme(Lumo.class)
@Route("")
public class ViewContainer extends VerticalLayout implements RouterLayout{
private final HorizontalLayout contentLayout;
public ViewContainer()
{
//content
}
public void showRouterLayoutContent(HasElement content) {
if (content == null) {
contentLayout.getElement().appendChild(new Div().getElement());
return;
}
contentLayout.getElement().appendChild(content.getElement());
}
}
Hello,
our student-project is set up on vaadin flow (vaadin 10).
When entering, page content is null. I have to reroute a part of my page to show a “welcome” content defined in WelcomeView.class.
@HtmlImport("styles/shared-styles.html")
@Route(value = "welcome", layout = ViewContainer.class)
public class WelcomeView extends Div {
public void WelcomneView(){
....
Can anyone please help me or give a hint in any kind?
At the moment a local server is set up and localhost:9090 just shows site as shown in attachment.
On the right side there should be content of “WelcomeView” but is empty at the moment.
17102086.xcf (131 KB)