AnsweredAssumed Answered

show links of related documents as links in metadata

Question asked by kay_be_ on Feb 6, 2012
Latest reply on May 15, 2012 by etoropov
I have a content model for documents with a qrcode property. I then have to make a script for retreiving documents with the same qrcode and have to list them in the metadata as a link. That way a user can look up the related document with the same qrcode.
I linked the documents by creating an association between the nodes.
My problem is that the related docs are listed with a path in alfresco explorer and as a title in Share but there are no links the user can click on…  :?

My model;

<?xml version="1.0" encoding="UTF-8"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="herinnering:demomodel" xmlns="">
<!– Optional meta-data about the model –>
<author>Red Tree</author>

   <!– Import Alfresco Dictionary Definitions –>
   <import uri="" prefix="d"/>
   <!– Import Alfresco Content Domain Model Definitions –>
   <import uri="" prefix="cm"/>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>   <namespaces>      <namespace uri="com.ephesoftalfrescoherinnering.demo" prefix="herinnering"/>   </namespaces>
   <constraint name="herinnering:talen" type="LIST">
      <parameter name="allowedValues">
      <type name="herinnering:document">
          <property name="herinnering:factuurnummer">
         <property name="herinnering:geadresseerde">
         <property name="herinnering:qrcode">
            <index enabled="true">

         <property name="herinnering:type">
              <title>Type document</title>
         <property name="herinnering:voorwerp">
         <property name="herinnering:dienst">
         <property name="herinnering:aantalblz">
              <title>aantal blz</title>
         <property name="herinnering:datumopmaak">
              <title>datum opmaak</title>
         <property name="herinnering:taal">
               <constraint ref="herinnering:talen"></constraint>           
      <aspect name="herinnering:relatedDoc">
         <title>Gerelateerde documenten</title>
            <association name="herinnering:relatedDocList">
               <title>Gerelateerde documenten:</title>

I have a script running on the files entering a folder:

var qrcode =["herinnering:qrcode"];
var query= "@herinnering\\:qrcode:" + qrcode;
var queryEncoded = search.ISO9075Encode(query);["herinnering:dienst"] = query;
var results = search.luceneSearch(query);
for (var i = 0; i<results.length; i++){
    document.createAssociation(results[i], "herinnering:relatedDocList" );

In web client config I make the related docs visible;

<config evaluator="aspect-name" condition="herinnering:relatedDoc">
      <show-association name="herinnering:relatedDocList" />

The problem is: the related docs are no links.
In alfresco explorer the related documents look like this;
(note: 'Gerelateerde documenten' = related documents)

The title is shown in Share but again, no link to the original document.
(note: 'Gerelateerde documenten' = related documents)

How can this be solved? Is there a better way to do this?
Any help appreciated.  8)