05-22-2007 06:34 AM
<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>
the whole thing works fine, and i can add an aspect to spaces & contents.05-24-2007 12:37 PM
05-25-2007 03:21 AM
05-27-2007 06:02 AM
nodeService.getTargetAssocs(nodeRef, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "Thumbnail"));( Thumbnail comes from here: <association name="custom:Thumbnail"> )
05-27-2007 11:20 AM
<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
05-27-2007 11:54 AM
return DownloadContentServlet.generateBrowserURL(ref.get(0).getTargetRef(), ref.get(0).getTargetRef().getId());
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.