Open Fedoseew opened 1 year ago
When we making jmix application for customers like banks, always need track every actions of users on application screens. For example: What and when user open screen, when they close screen,... AOP is much more simple for this task. Please take care about this function.
Simply adding the @Inherited
annotation to the @ViewController
annotation helps partially. If the target method uses fields annotated with @ViewComponent
, they are not initialized. Thus, we need to teach our injectors to take AOP into account.
To simply track opening and closing of views, global application events can be used:
io.jmix.flowui.event.view.ViewOpenedEvent
io.jmix.flowui.event.view.ViewClosedEvent
Also, we have view monitoring: https://github.com/jmix-framework/jmix/issues/1704#issuecomment-1943207017
General description of the problem:
At the moment, if we want to use a simple boxed approach to writing aspects, then we will face the problem that writing aspects that will belong to the view controller class is impossible. Since when creating a proxy object, it will not have an
@ViewController
annotation and the screen will not open. This occurs because the@ViewController
annotation is not annotated with the@Inherited
annotation.Technical details:
@Aspect @Component public class ExampleAspect {
}