Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
PreserveOnRefresh on a Portlet
I have a vaadin 7.5.2 portlet that's exhibiting odd behavior when it's deployed in Liferay portal (6.2CE ga2, tomcat bundle). The UI for the portlet does not have PreserveOnRefresh set. When I run it just as a stand alone servlet for UI testing I can see in the log and a Notification.show I stuck in the UI.init method that in fact the init method is being run every time I refresh, as expected. However, when it's deployed as a portlet the init method only gets called once regardless of whether I refresh the page. The portlet is built using the self-contained approach so in either case the jars should be the same. Any thoughts as to where to look to solve this issue?
Update: A little more investigation yields that it is behaving exactly as if @PreserveOnRefresh was set on the UI when deployed as a portlet. That is, UI.init is called once on the initial display of the portlet and subsequent page refreshes call UI.refresh . In the stand alone mode UI.refresh is not called and UI.init is called for each page refresh. I swapped out my custom component which was the content of the UI for a com.vaadin.ui.Label with no change in behavior. Is there some other place that PreserveOnRefresh can get set ?
Yes. It happens. Liferay might be adding preserve on refresh on top of Vaadin I guess.