wood burning stoves*
The moose likes Other Application Frameworks and the fly likes Vaadin selectedTabChangeListener - need to capture originating tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Vaadin selectedTabChangeListener - need to capture originating tab" Watch "Vaadin selectedTabChangeListener - need to capture originating tab" New topic
Author

Vaadin selectedTabChangeListener - need to capture originating tab

Kelly Moffat
Greenhorn

Joined: Oct 22, 2012
Posts: 3

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vaadin selectedTabChangeListener - need to capture originating tab
 
Similar Threads
JInternalFrames and focus
Hiding a JComboBox's popup window
JPanel/JTabbedPane Focus question
ScrollPane inconsistencies
Is there a way to catch a browser's event in a JSP ?