Lazy initialization of component in Window/Panel

Hello.

I need lazy component initialization. Is there such in Vaadin? The user case is, that everything is triggered by constructor and in that time dependency injections are not valid yet. Adding manual DI injections is not something I want to do.

Example:


public MyWindow extends Window(){
   @Inject
    MyService service;
   public MyWindow(){
      // service is null in this poins
    }
   @Override
   public voi postInitialize(){
     // service initialized already in this point
   }

}

Answering myself:
Use constructor injection


public MyWindow extends Window(){
  
    private MyService service;
  @Inject
   public MyWindow(final MyService service){
    this.service = service;
    }

}