Hello!
I'm not sure if this is best for Beginning
Java or the next level, but I'm afraid that the issue is something simple I'm missing because I'm so new so I am starting here.
I have an application that I am developing using the Vaadin framework. I have a stack of tabs that is added to each time you click a button representing different entities. The default close handler for a tab in Vaadin if you are closing the same tab that is currently selected is to make the first/bottom tab in the list the active tab. What I want to do is make the tab that was most recently selected, before the closed tab was selected, the active tab. I believe I can do this if I can capture the originating tab before a tab change event. Unfortunately, I can only find a way to capture the newly selected tab, not the one that was selected initially. I found a couple of code examples out there that have me do something similar to this:
stack is my TabSheet that I am working with. In debug, I see that the "selected" variable that I have before the event is processed is always null. It doesn't seem to get assigned the value as it apparently does in the examples I've found online.
Any ideas on how I can get this selected? I've been stuck on this for two days and I'm just sure it's something simple that I'm missing because I'm new and not thinking about things correctly.
Thank you!