Search in sources :

Example 1 with ViewCloseReason

use of de.metas.ui.web.view.ViewCloseReason in project metasfresh-webui-api by metasfresh.

the class SalesOrder2PurchaseViewFactory method onViewRemoved.

private final void onViewRemoved(final RemovalNotification<Object, Object> notification) {
    final PurchaseView view = PurchaseView.cast(notification.getValue());
    final ViewCloseReason closeReason = ViewCloseReason.fromCacheEvictedFlag(notification.wasEvicted());
    view.close(closeReason);
    if (closeReason == ViewCloseReason.USER_REQUEST) {
        saveRowsAndEnqueueIfOrderCompleted(view);
    }
}
Also used : ViewCloseReason(de.metas.ui.web.view.ViewCloseReason)

Aggregations

ViewCloseReason (de.metas.ui.web.view.ViewCloseReason)1