Search in sources :

Example 1 with VisitsCalendarWidget

use of dashboards.ex1.screen.widgets.VisitsCalendarWidget in project jmix-docs by Haulmont.

the class VisitScheduleAssistant method dashboardEventListener.

@EventListener
public void dashboardEventListener(DashboardUpdatedEvent event) {
    // <4>
    // <5>
    ScreenFragment widget = dashboard.getWidget("visits-calendar");
    if (widget instanceof VisitsCalendarWidget) {
        // <6>
        VisitsCalendarWidget visitsCalendarWidget = (VisitsCalendarWidget) widget;
        visitsCalendarWidget.reloadSchedule();
    }
}
Also used : VisitsCalendarWidget(dashboards.ex1.screen.widgets.VisitsCalendarWidget) ScreenFragment(io.jmix.ui.screen.ScreenFragment) EventListener(org.springframework.context.event.EventListener)

Aggregations

VisitsCalendarWidget (dashboards.ex1.screen.widgets.VisitsCalendarWidget)1 ScreenFragment (io.jmix.ui.screen.ScreenFragment)1 EventListener (org.springframework.context.event.EventListener)1