Prototype Beans doesn`t work.

Hi all, got a problem. Using Java, Spring boot 3, Vaadin 24.
For example, i want to make @Bean from TextField, then i @Autowired it to my @Service class to configure somehow. And ofc, i`d like to use my bean and add it to layout(does not matter which one). I i will make this bean as @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) and will try to generate more than one bean, i got EMPTY beans, it means, that if i want to set some TextField parameters, they will not represent to the view. I dont understand how and why Vaadin wipe my beans :frowning_with_open_mouth:

Any ideas?

You can’t inject Vaadin’s fields (prototype / used once) in a Service (singleton / used for everyone)

I saw this, but i dont understand why

ya, read that already. Unfortunately, as i understand, we can`t make custom bean-factory with Vaadin components.

You can still inject your own components marked as bean in routes, but those can’t be injected in e.g. services. For example you can create a PersonForm which has all fields you wanna inject into PersonView or AdminView to reduce duplication

ya, i agreed, thx