code: @PostConstruct
      void init() {
          LOGGER.info("I'm being created: {}", this);
          setMargin(true);
          setSpacing(true);
  
          final Label label = new Label(String.format("This is a prototype scoped view. A new instance is created every time this view is shown. " +
                  "This particular instance is <b>%s</b>. If you navigate away from this view and back, you'll notice that the instance changes every time.", this));
          label.setContentMode(ContentMode.HTML);
          addComponent(label);
  
          addComponent(new Button("Invoke a UI scoped business object", new Button.ClickListener() {
              @Override
              public void buttonClick(Button.ClickEvent event) {
                  addComponent(new Label(uiScopedBusinessObject.sayHello()));
              }
          }));
      }
docs: You can inject UI scoped beans into a prototype scoped bean