Hello we have a Host screen class where we are creating our fragments.
We put the fragments in a HashMap and then we are loading a comboBox with the HashMap.
We use the comboBox to switch between the fragments. What we would like to achieve is subscribing for an event from the Host screen,
so we can visualize a warning on it. The event should be triggered from any of the fragments related to the Host screen.
What would be the best way to achieve this?
We have tried followingListening to Fragment Events in Host Screen, but we are getting the below error upon opening the HostScreen.
java.lang.UnsupportedOperationException: Unsupported @Subscribe target CONTROLLER. It is not a Fragment. at io.jmix.ui.sys.UiControllerDependencyInjector.initSubscribeListeners(UiControllerDependencyInjector.java:317)
Kind regards,
Dimitar