Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin Business Start Architecture

Zac Harvey
3 years ago Jul 13, 2019 2:43am
Joacim Päivärinne
3 years ago Jul 23, 2019 7:30am

Hi Zac,

  1. We want the Home view to be rendered inside MainLayout. We accomplish that with @Route(value = "", layout = MainLayout.class).
  2. It's not used anywhere, it can safely be removed.
  3. MainLayout implements RouterLayout so that it can be used as a parent layout. See docs over at https://vaadin.com/docs/v13/flow/routing/tutorial-router-layout.html for more information.
  4. That's a mistake, I'll remove that in a future update.
  5. Another mistake. Accounts shouldn't implement RouterLayout because it's not used as a parent layout for other views. It's important to note the difference between extending a class and defining the parent. Accounts does not extend MainLayout just because it's defined as the parent.
  6. setParameter is called before onAttach.
Zac Harvey
3 years ago Jul 26, 2019 1:33am

Awesome answers! Thanks Joacim!