cancel
Showing results for 
Search instead for 
Did you mean: 

Clickable association in Custom model type

sakshik
Star Contributor
Star Contributor

Hello,

I have created a custom model type which has properties and associations. One of the associations is 'Related Document'  of class cm:content. 'Related Document' metadata lets you choose the document from Repository but the document is not clickable.

In share-config-custom.xml I have made:

<config evaluator="model-type" condition="aa:metadata">
   <forms>
      <form>
         <field-visibility>

            <show id="cm:title"/>
            <show id="aa:related_doc" />

        </field-visibility>

        <appearance>

            <field id="aa:related_doc">
                  <control template="/org/alfresco/components/form/controls/association.ftl">
                     <control-param name="showTargetLink">true</control-param>
                     <control-param name="allowNavigationToContentChildren">true</control-param>
                  </control>
            </field>

         </appearance>

   </form>

   <form id="doclib-simple-metadata">

         <field-visibility>

            <show id="cm:title"/>
            <show id="aa:related_doc" />

        </field-visibility>

        <appearance>

            <field id="aa:related_doc">
                  <control template="/org/alfresco/components/form/controls/association.ftl">
                     <control-param name="showTargetLink">true</control-param>
                     <control-param name="allowNavigationToContentChildren">true</control-param>
                  </control>
            </field>

         </appearance>

   </form>

</forms>

</config>

 

1 ACCEPTED ANSWER

sakshik
Star Contributor
Star Contributor

Replaced

<config evaluator="model-type" condition="aa:metadata">

with

<config evaluator="node-type" condition="aa:metadata">

as

showTargetLink functionality works only on node-type evaluator

View answer in original post

1 REPLY 1

sakshik
Star Contributor
Star Contributor

Replaced

<config evaluator="model-type" condition="aa:metadata">

with

<config evaluator="node-type" condition="aa:metadata">

as

showTargetLink functionality works only on node-type evaluator