@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; } }
@Override public IContent getContent() { table = Frontend.getInstance().createTable(keys, this); if (objects == null || reloadFlag) { objects = load(); reloadFlag = true; } table.setObjects(objects); return table; }
@Override public void action(T selectedObject) { if (detailPage != null) { updateDetailPage(selectedObject); } else { detailPage = createDetailPage(selectedObject); if (detailPage != null) { Frontend.showDetail(TablePageWithDetail.this, detailPage); } } }