From: Patrick Plitzner
Date: Wed, 27 Apr 2016 06:05:27 +0000 (+0200)
Subject: Add suppport for User and Group to ReferencingObjectsView #5603
X-Git-Tag: 4.0.0^2~10
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/226064924eb644021e8857cacf116f579dfdea5a
Add suppport for User and Group to ReferencingObjectsView #5603
- disable viewer table when no selection available
---
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
index 9db3b0b84..cc87ecc42 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
@@ -251,6 +251,10 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
referencedObject = CdmStore.getService(ITermService.class).load(entity, null);
} else if (EventBase.class.isAssignableFrom(objectClass)){
referencedObject = CdmStore.getService(IEventBaseService.class).load(entity, null);
+ } else if (User.class.isAssignableFrom(objectClass)){
+ referencedObject = CdmStore.getService(IUserService.class).load(entity, null);
+ } else if (Group.class.isAssignableFrom(objectClass)){
+ referencedObject = CdmStore.getService(IGroupService.class).load(entity, null);
}
//referencedObject =(CdmBase) CdmStore.getService(IIdentifiableEntityService.class).load(referencedObject.getUuid());
Set setOfReferencingObjects = null;
@@ -308,6 +312,9 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
} else {
setContentDescription("");
}
+ if(referencingObjects==null){
+ viewer.getControl().setEnabled(false);
+ }
showViewer();
}catch(Exception e){
setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");