]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.akb.ui/src/main/java/org/argeo/slc/akb/ui/composites/ItemTemplateTitleComposite.java
Fix environment editor
[gpl/argeo-slc.git] / plugins / org.argeo.slc.akb.ui / src / main / java / org / argeo / slc / akb / ui / composites / ItemTemplateTitleComposite.java
index 0c21c7e7cef557c86dc45286eecfdd404a2bc356..56c015c7ff984e66ab2b785423b9d73342aad550 100644 (file)
@@ -219,8 +219,13 @@ public class ItemTemplateTitleComposite extends Composite {
                        if (itemNode.hasProperty(AkbNames.AKB_USED_CONNECTOR)) {
                                String aliasPath = itemNode.getProperty(
                                                AkbNames.AKB_USED_CONNECTOR).getString();
+                               
+                               if (!itemNode.getSession().nodeExists(aliasPath))
+                                       return -1;
+
                                Node alias = itemNode.getSession().getNode(aliasPath);
-                               return aliasCmb.indexOf(alias.getProperty(Property.JCR_TITLE).getString());
+                               return aliasCmb.indexOf(alias.getProperty(Property.JCR_TITLE)
+                                               .getString());
                        } else
                                return -1;
                } catch (RepositoryException re) {