@Override public void changeSelection(SelectionChangedEvent<GPClientProject> se) { GPClientProject clientProject = se.getSelectedItem(); if (clientProject != null) { super.selectButton.enable(); IGPAccountDetail accountInSession = Registry.get(UserSessionEnum.ACCOUNT_DETAIL_IN_SESSION.name()); if (clientProject.getOwner() == null || clientProject.getOwner().getId().equals(accountInSession.getId())) { deleteButton.enable(); this.editButton.enable(); this.shareButton.enable(); } else { this.shareButton.disable(); this.editButton.disable(); deleteButton.disable(); } } else { selectButton.disable(); deleteButton.disable(); editButton.disable(); this.shareButton.disable(); } }
/** {@inheritDoc} */ @Override public void selectionChanged(final SelectionChangedEvent<ModelData> selectionChangedEvent) { final String id = selectionChangedEvent.getSelectedItem().get("id"); _commentTable.displayComments((null == id) ? null : CommentStatus.valueOf(id)); }