As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<aspect name="custom:ThumbnailAspect"> <title>Thumbnail Aspect</title> <associations> <association name="custom:Thumbnail"> <title>Thumbnail</title> <source> <many>true</many> </source> <target> <class>cm:content</class> <mandatory>false</mandatory> <many>false</many> </target> </association> </associations> </aspect>
nodeService.getTargetAssocs(nodeRef, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "Thumbnail"));
<a:actionLink id="col11_thumb-act1" value="#{r.name}" href="#{r.url}" target="new" image="#{r.thumbnail}" showLink="false" styleClass="inlineAction"/>
node.addPropertyResolver("thumbnail", this.resolverThumbnail);
public NodePropertyResolver resolverThumbnail = new NodePropertyResolver() { public Object get(Node node) { NodeRef nodeRef = node.getNodeRef(); List<AssociationRef> ref = new ArrayList<AssociationRef>(); QNamePattern qualifiefName = QName.createQName(NamespaceService.CUSTOM_MODEL, "Thumbnail"); if(nodeService != null) { ref = nodeService.getTargetAssocs(nodeRef,qualifiefName); } if ( ref!= null){ if ( ref.size() > 0) { return ref.get(0).getTargetRef(); } }return null;
workspace://SpacesStore/06395321-082e-11dc-beed-3fbcc9294cb8
return DownloadContentServlet.generateBrowserURL(ref.get(0).getTargetRef(), ref.get(0).getTargetRef().getId());