I am Learning Vaadin Flow (Vaadin v10) and am having difficulty with the concepts of Route (@Route as annotation) and RouterLayout.
From the documentation that I have already read on Vaadin's website! I could not identify an answer to a particular question.
Can a class implementing RouterLayout be also defined as a @Route?
@Route("")
public class MainLayout extends Div implements RouterLayout {
}
Please (if possible) provide a reference to some documentation. As far as I understand a RouterLayout
is intended to render the views in it. Therefore if necessary public void showRouterLayoutContent(HasElement content)
method could be Overridden for desired layout creation. Thus placing @Route annotation which essentially defines a view does not make sense to be mixed with a RouterLayout?
Or does it? If RouterLayout can be used with @Route annotation, suggesting that layout is also a view; Can some provide me a simple scenario where can this be useful?