Refresh TabSheet when Tab Clicked

I have a TabSheet and I’d like to be able to refresh the contents of the selected tab when the user clicks on the currently selected tab/caption at the top.

It’s easy to detect when a different tab is selected, but is there a way to detect when the current tab caption is selected?

Thanks.

If I understood correctly, you would like to receive an event on the server side when the user clicks on the tab header of a tab that is already the selected/active tab. This is not easily doable. The event is not propagated from the client side at all, so you would probably need to do some client-side extensions to enable this. For details, see the onTabSelected(final int tabIndex) method of the VTabSheet class (starting from row 624 in Vaadin 6.8.5). You’ll notice from the code that it’ll only send the event if the given tabIndes is different from the currently active tab index.