Hi,
I am trying to refresh some components in a view periodically.
After I tried around and failed with the UiEventPublisher bean (EventListener stops working after page refresh for some reason), I tried implementing the Timer facet to handle the periodic refresh.
However, on page refresh (e.g. manually reloading browser tab), the view throws following exception:
java.lang.IllegalStateException: Unregistered node was not found based on its id. The tree is most likely corrupted.
I used the Timer facet as described in the docs:
XML
<facets>
<timer id="calendarRefreshTimer" delay="10000" autostart="true" repeating="true"/>
</facets>
View-Controller
@Subscribe("calendarRefreshTimer")
public void onCalendarRefreshTimerTimerAction(final Timer.TimerActionEvent event)
{
//refresh component
}
I played around a bit and found that the @PreserveOnRefresh annotation of my View-Controller seems to be the cause of this issue. Without the annotation, i get no errors and the timer works as expected.
Jmix version: 2.2.1
Jmix Studio plugin version: 2.2.1-233
Any ideas?
Thanks!