سؤال

I'm developing an Alfresco app in Alfresco Explorer. In this app I create a Space and some content inside it, my question is how to get the space nodeRef when i'm working in a java class inside to list the contents.

Actually I'm trying this:

String nodeId = this.navigator.getCurrentNodeId();
NodeRef parentNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);
List<ChildAssociationRef> children = this.nodeService.getParentAssocs(parentNodeRef);

But Returns null

هل كانت مفيدة؟

المحلول

It should be the following:

ChildAssociationRef car = this.nodeService.getPrimaryParent(parentNodeRef);
NodeRef parentNode = car.getParentRef();
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top