Package com.vaadin.flow.router
Interface RouterLayout
- All Superinterfaces:
HasElement
,Serializable
- All Known Implementing Classes:
AppLayout
,UI
,WebComponentUI
Implementations of this interface represent a parent for a navigation target
components via the
Route.layout()
parameter.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
removeRouterLayoutContent
(HasElement oldContent) Removes content that should no longer be shown in this router layout.default void
showRouterLayoutContent
(HasElement content) Shows the content of the layout which is the router target component annotated with a@Route
.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
showRouterLayoutContent
Shows the content of the layout which is the router target component annotated with a@Route
.Note implementors should not care about old
@Route
content, since it's handled separately byremoveRouterLayoutContent(HasElement)
which by default simply removes the old content.- Parameters:
content
- the content component ornull
if the layout content is to be cleared.
-
removeRouterLayoutContent
Removes content that should no longer be shown in this router layout. IfshowRouterLayoutContent(HasElement)
was previously called with a non-null parameter, then this method will be called with the same parameter immediately before callingshowRouterLayoutContent(HasElement)
again.By default, the old content is removed from its parent using
Element.removeFromParent()
.- Parameters:
oldContent
- the old content to remove, notnull
-