Interface RouterLayout

All Superinterfaces:
HasElement, Serializable
All Known Implementing Classes:
AppLayout, UI, WebComponentUI

public interface RouterLayout extends HasElement
Implementations of this interface represent a parent for a navigation target components via the Route.layout() parameter.
Since:
1.0
Author:
Vaadin Ltd
  • Method Details

    • showRouterLayoutContent

      default void showRouterLayoutContent(HasElement content)
      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 by removeRouterLayoutContent(HasElement) which by default simply removes the old content.

      Parameters:
      content - the content component or null if the layout content is to be cleared.
    • removeRouterLayoutContent

      default void removeRouterLayoutContent(HasElement oldContent)
      Removes content that should no longer be shown in this router layout. If showRouterLayoutContent(HasElement) was previously called with a non-null parameter, then this method will be called with the same parameter immediately before calling showRouterLayoutContent(HasElement) again.

      By default, the old content is removed from its parent using Element.removeFromParent().

      Parameters:
      oldContent - the old content to remove, not null