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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
@Injecting Viritin AbstractForm in html @DesignRoot view
I have a html based layout and I want to inject a subcass of AbstractForm (with an ElementCollectionField). The abstract form is to be shown in a popup window using .openInModalPopup() so there is no component in the html field bound to the form injected in the java @DesignRoot view. Therefore Vaadin complains about unbound fields. So I have temporarily resolved this by instantiating the form using a constructor instead, in the clickHandler for the button supposed to open it, and I pass inn the resources the form needs instead of injecting them, because it is not CDI-managed any more.
I was kind of hoping to find some sort of @Unbound annotation or something to have the Vaadin declarative framework ignoring it, but I haven't. Which is the best way to resolve this? I'd like to have CDI manage the form and the resources it needs.
Sort of nobrainer this, really. Keeping the bound fields separate in the design class and put everything else in a subclass (including the injected form) is good practice, and resolved the problem.