#5282 Use null session in referencing objects view
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 15:31:18 +0000 (16:31 +0100)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 15:31:18 +0000 (16:31 +0100)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java

index 12b2ef19f297c8d11c6643d6379b60ceab99f0dc..7895964773c63c68547bb0b15525b5c50780fab0 100644 (file)
@@ -82,7 +82,7 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
        private ICdmEntitySession cdmEntitySession;
 
        public ReferencingObjectsView() {
        private ICdmEntitySession cdmEntitySession;
 
        public ReferencingObjectsView() {
-           cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+           cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession();
        }
 
        /* (non-Javadoc)
        }
 
        /* (non-Javadoc)
index 9efd8ec423c075402ad20772a9fdf5accd24c930..22aa7bead5ce0c24fc607e48bee3e17aec5a5acc 100644 (file)
@@ -203,6 +203,9 @@ public class NullSession implements ICdmEntitySession {
      */
     @Override
     public List<String> getPropertyPaths(Object obj) {
      */
     @Override
     public List<String> getPropertyPaths(Object obj) {
+        if(sessionOwner == null) {
+            return null;
+        }
         Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
         if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
             return null;
         Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
         if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
             return null;