New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Component instead of VerticalLayout removes TextFields #8115
Comments
Should the Vaadin version be 14.1.5? If using 14.1.5 could you update to 14.1.25 to see if the issue still persists. |
Sorry for the confusion, 14.2.5 is the Vaadin version (LTS). |
I'm also miss typing. Vaadin 14.1.25 is the newest LTS that is out. Vaadin 14.2.0.beta1 is on its way, but not yet out. |
You're totally right. Of couse I meant 14.1.25. Martin Israelsen guesed in the forum, that the issue might be related to the optimizer. |
How did you get Spring to accept Component in the constructor as it's not a bean? |
Once again I have to beg for pardon. This is my worst bug report ever... Of course CustomerData ist annotated with @component. Should have uploaded my test project. |
That's fine I got it to replicate as described. |
Great! Thanks for your patience! |
As far as I can see, this problem got worse with Vaadin 24.1. We use injection to make certain parts of the UI configurable by downstream projects. All components that are only referenced in the downstream project are no longer part of the delivered bundle. We can't use It would be helpful if we can specify other classes, e.g. at AppShellConfigurator, which are also considered in the Component Scan. Also, since we often work with configuration interfaces that provide methods for the various components used, it would be helpful if the |
You should be able to use Lines 92 to 97 in 8ba35da
|
Description of the bug
Instead of using
public CreateTab(CustomerData customerData, ChapterSelection chapterSelection, Download download) {
I usedpublic CreateTab(Component customerData, ChapterSelection chapterSelection, Download download) {
.Spring was able to find the import since the parameter name was identical to the bean name automatically generated from the class.
After running mvn install -P production running the application (even local) show a UI without any TextField
Minimal reproducible example
Add this two classes to a clean vaadin starter project and remove the default ui elements.
If you do a
mvn install -P production
the UI is broken. If you enable the TextField in CreateTab it works again.Expected behavior
A TextField should be rendered even if injected with Component instead of VerticalLayout
TextField is not rendered if injected with Component instead of VerticalLayout
Versions
- Vaadin / Flow version
14.2.5
- Java version
11
https://vaadin.com/forum/thread/18215575/production-mode-breaks-textfield
The text was updated successfully, but these errors were encountered: