Vaadin 7 refreshes embedded web content when tabs changed on tabsheet

I got the same problem. Is ther any news Of how to resolve?

did you try with @PreserveOnRefresh?

I got similar behaviour using SllitPanel putting to 0 and 100 (with .setSplitPosition(0)) in that case the browser doesn’t refresh and gets hide and the other content is show, the problem is that with split you can have only 2 components, then Tab behavior as was in 6 is better.

note @PreserveOnRefresh in this case didn’t make any difference

Same problem here. We have SVG drawn on tabs. You can add to it or move it around. When you select another tab and come back to the tab it refreshes the SVG back to what was drawn on the tab when the tab was created.

Any news on this?

Hello,

Same behaviour here, when switching tab with an iFrame, content of the iFrame is re-init.
This issue is logged on http://dev.vaadin.com/ticket/9191 ticket but is marked as “wontfix”.

What the matter ? Any news ?

Edit 03/03/14 : just found http://dev.vaadin.com/ticket/12616 that refer to my issue but no activity on it

Yes, i too have the same problem with latest 7.1.10 and 7.2.4. in my case i have a table within the tabs and when switch tabs it refresh the whole tab and gives a while blank tab for few seconds and then renders the content again. @PreserveOnRefresh does not have any impact on the screen. any quick work around available.

The thread is quiet old but the problem still exist. I have the same problem in my application. Did anyone find a workout? Or is there an official solution to solve that problem?

Best regards,
Michel Klein

I’m having exactly the same problem as
Cup Of Tea
with Vaadin 7.3.4. The ticket mentioned in his post above is closed, but I do not agree. When I open a website in one Tab it should keep its state when I return to that Tab after visiting another Tab in the Tabsheet.
I’m wondering if any of the above posters has found a workaround in the mean time?

Any solution/workaround on this?
I think this should be left to the user to decide if he wants the tab refreshed or not.

Really bad on the API creator to restrict these kind of actions.

I’m running into this problem with any method of hiding/showing a BrowserFrame… in every circumstance, not just TabSheets, it refreshes. Any workarounds from the Vaadin team would be appreciated!

Any solution/workaround to that problem?

Same problem here please some one give us a solution because It’s critical to performance

Same problem

Exactly same problem here. Any solution/workaround?

Exactly same problem here. Any solution/workaround?

you should check out my work around…

https://vaadin.com/forum#!/thread/8185261

There was a change in how TabSheet works between Vaadin 6 and 7. In Vaadin 6, all tab contents were in the DOM and only their visibility was changed when switching tabs. In Vaadin 7 the tab content is actually removed from the DOM and reattached when shown to keep the DOM more lightweight and secure (not keep invisible content in the DOM).

So, unfortunately, if you want to keep all tabs’ content in the DOM even when not visible, you’ll need to write your own TabSheet. Fortunately, this is not as complicated as it may first sound. You’ll need to create your own composition that has buttons for tabs and maps those to components. You can then have logic that hides/shows the content when you select a tab. The biggest downside here is that you need to style your tabsheet yourself to get it to look like everything else in Vaadin.

Is this problem solved in Vaadin 8? I have an openlayers map app in a tab. When I switch to an other tab and back again the map is reinitialized. Zooming and panning is reset and all markers and other features have disappeared.

Changing to 8 soon, so it would be good to know if I should spend time on a workaround or not.

Thanks!

This problem exist in Vaadin 8 also.

As stated before, TabSheet works like this intentionally. In Vaadin 6 the implementation was different and we learned that having all the content of the all the tabs maintained caused more problems to more users than the current approach. Basically the “workaround” or the correct way to do, is to maintain the necessary information in the application or your component, and use that in tab change event.