<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Potential Share Association Issue in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296759#M249889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a client on Alfresco Enterprise 4.1.2 who wants to be able to click the attachments for a custom type to be able to navigate to the attachments.&amp;nbsp; A quick look at the Forms wiki and this seems pretty straight forward.&amp;nbsp; I added the following to my Share custom config:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;field id="cm:attachments"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;control template="/org/alfresco/components/form/controls/association.ftl"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;control-param name="displayMode"&amp;gt;list&amp;lt;/control-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;control-param name="showTargetLink"&amp;gt;true&amp;lt;/control-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/control&amp;gt;&lt;BR /&gt;&amp;lt;/field&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I test it first on an email and it works beautifully.&amp;nbsp; I then click the link for one of the attachments and I get the following error on the details screen for the attachment (I have trimmed it for readability):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2013-07-08 13:52:00,181&amp;nbsp; ERROR [freemarker.runtime] [http-8080-1] Template processing error: "Expression field.endpointType is undefined on line 22, column 20 in org/alfresco/components/form/controls/association.ftl."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression field.endpointType is undefined on line 22, column 20 in org/alfresco/components/form/controls/association.ftl.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problematic instruction:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;———-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==&amp;gt; ${field.endpointType} [on line 22, column 18 in org/alfresco/components/form/controls/association.ftl]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in include "${field.control.template}" [on line 90, column 7 in org/alfresco/components/form/form.lib.ftl]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in user-directive renderField [on line 121, column 13 in org/alfresco/components/form/form.lib.ftl]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in user-directive formLib.renderSet [on line 23, column 16 in org/alfresco/components/form/form.get.html.ftl]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in user-directive formLib.renderFormContainer [on line 20, column 7 in org/alfresco/components/form/form.get.html.ftl]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;———-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Java backtrace for programmers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;———-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;freemarker.core.InvalidReferenceException: Expression field.endpointType is undefined on line 22, column 20 in org/alfresco/components/form/controls/association.ftl.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At this point I figured I could work around it.&amp;nbsp; I created my own association.ftl (we will call it myAssociation.ftl) where I made one change to line 22 as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemType: "${field.endpointType!"cm:cmobject"}",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the !"cm&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;bject" part.&amp;nbsp; This sort of worked.&amp;nbsp; Now the page comes up but I get a property for cm:attachments (not Attachments) on the attached file.&amp;nbsp; This is better than it failing but it should just be ignoring it all together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug or am I doing something wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 18:05:35 GMT</pubDate>
    <dc:creator>eamell</dc:creator>
    <dc:date>2013-07-08T18:05:35Z</dc:date>
    <item>
      <title>Potential Share Association Issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296759#M249889</link>
      <description>I have a client on Alfresco Enterprise 4.1.2 who wants to be able to click the attachments for a custom type to be able to navigate to the attachments.&amp;nbsp; A quick look at the Forms wiki and this seems pretty straight forward.&amp;nbsp; I added the following to my Share custom config:&amp;lt;field id="cm:attachment</description>
      <pubDate>Mon, 08 Jul 2013 18:05:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296759#M249889</guid>
      <dc:creator>eamell</dc:creator>
      <dc:date>2013-07-08T18:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Potential Share Association Issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296760#M249890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you leave out the template on your control, this problem should solve itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The cm:attachments association is tied to a specific aspect, so it is not always set. In situations where it isn't set (does not have a value), the Forms service Alfresco of the Repository does not generate the necessary description for Share to build a field upon it. When you put a control with a template on a field in Share form configuration, you are essentially doing a force=true, but without the necessary Repository data, e.g. for labels and stuff. If you don't, the default behavior is to only show a field if it actually applies to the current node. Share will automatically use the association.ftl without you having to specify it manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is an explicit "transient" field behavior of Alfresco for use-cases where you want to build your own form without having a clear-cut data model on the Repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 21:45:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296760#M249890</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-07-09T21:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Potential Share Association Issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296761#M249891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I leave out the template then there are no links to click the document.&amp;nbsp; I need to customize the control with the displayMode and showTargetLink.&amp;nbsp; I tried explicitly setting force to false but I guess having the template overrides it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 14:00:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296761#M249891</guid>
      <dc:creator>eamell</dc:creator>
      <dc:date>2013-07-10T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Potential Share Association Issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296762#M249892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe I should try reading your post &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&amp;nbsp; I get what you were saying now.&amp;nbsp; I need the control and the control params but not the template attribute of the control.&amp;nbsp; Thanks for the help that worked!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 14:16:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296762#M249892</guid>
      <dc:creator>eamell</dc:creator>
      <dc:date>2013-07-10T14:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Potential Share Association Issue</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296763#M249893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So just to clarify for anyone else seeing this issue my config should have read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;field id="cm:attachments"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;control&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;control-param name="displayMode"&amp;gt;list&amp;lt;/control-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;control-param name="showTargetLink"&amp;gt;true&amp;lt;/control-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/control&amp;gt;&lt;BR /&gt;&amp;lt;/field&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 14:18:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/potential-share-association-issue/m-p/296763#M249893</guid>
      <dc:creator>eamell</dc:creator>
      <dc:date>2013-07-10T14:18:04Z</dc:date>
    </item>
  </channel>
</rss>

