@Override public void selectionChanged(T selectedObject, List<T> selectedObjects) { boolean detailVisible = detailPage != null && Frontend.isDetailShown(detailPage); if (detailVisible) { if (selectedObject != null) { updateDetailPage(selectedObject); } else { Frontend.hideDetail(detailPage); } } }
private void updateDetailPage(T selectedObject) { DETAIL_PAGE updatedDetailPage = updateDetailPage(detailPage, selectedObject); if (Frontend.isDetailShown(detailPage)) { if (updatedDetailPage == null || updatedDetailPage != detailPage) { Frontend.hideDetail(detailPage); } } if (updatedDetailPage != null) { Frontend.showDetail(TablePageWithDetail.this, updatedDetailPage); detailPage = updatedDetailPage; } }