Hi,
From this post:
https://www.cuba-platform.com/discuss/t/allow-customization-of-appui-error-management/3787
I learned that can extend AppUI using following way:
<bean id="cuba_AppUI" class="com.company.appui.web.CustomAppUI"
scope="vaadin"/>
I have gave a try, there will occur some error when app starting:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dashboard_dropComponentsFactory': Unsatisfied dependency expressed through field 'appUI'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cuba_AppUI': Scope 'vaadin' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: Unable to use VaadinSessionScope from non-Vaadin thread
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
The cause of the error is that the bean’s scope be set to ‘vaadin’ , if i set the scope to ‘prototype’ ,it will seems works fine.
Is it a right way for extending AppUI ?