I was wondering how I can detect if a screen is selected when it is already opened as a tab? I know there is a tab change event for tab sheets I create on my screen but I can’t find an event or similar to respond to a selection of the main tabs where the screens are opened.
The reason I want to do this is that my main screen of the application contains a dashboard with a table of tasks. These tasks can be generated in different parts of the program where I can’t write something like: findMainScreenAndUpdate()
So I want to reload the task list once a user comes back to the main screen. The onAfterShow event only works when the screen is first opened.
That is working great, thank you very much.
I was now wondering how to detect if my dashboard is the currently opened tab/screen. I was looking into the thrown event but somehow
event.getSource().getSelectedTab().getCaption()
is returning null.
So for now, I am using this to reload my tasks but I am not sure if this is stable enough?