cancel
Showing results for 
Search instead for 
Did you mean: 

Association.ftl with node not selectable

theoryoflinkin
Champ on-the-rise
Champ on-the-rise
Hi,

In my workflow, I use the "association.ftl" in order to add external file to my workflow.


   <field id="sAET:cadastre" label-id="sAET.cadastre" set="complet_incomplet">
      <control template="/org/alfresco/components/form/controls/association.ftl">
         <control-param name="compactMode">true</control-param>
         <control-param name="showTargetLink">true</control-param>
         <control-param name="startLocation">/app:company_home/cm:Cadastre</control-param>
         <control-param name="selectActionLabel">Joindre le cadastre</control-param>
         <control-param name="displayMode">list</control-param>
      </control>
   </field>



But when I want to test this, I can't select a file (see attached file) because the add button (the "+" button) is not visible.

After some research, I found this inside the "object-finder.js" file ("ObjectRenderer_fnRenderCellAdd" function) :


        if (oRecord.getData("selectable"))
        {
               var nodeRef = oRecord.getData("nodeRef"),
               style = "";

               if (!scope.objectFinder.canItemBeSelected(nodeRef))
               {
                  style = 'style="display: none"';
               }

               elCell.innerHTML = '<a id="' + containerId + '" href="#" ' + style + ' class="add-item add-' + scope.eventGroup + '" title="' + scope.msg("form.control.object-picker.add-item") + '" tabindex="0"><span class="addIcon"> </span></a>';
               scope.addItemButtons[nodeRef] = containerId;
        }


I did some debug and "oRecord.getData("selectable")" return false but why?

What can I do to change this?

Thanks for your help
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
Could you post your workflow model file and process definition file?
You need to have 1–>n multiplicity in difinition of "sAET:cadastre"

Hi,

Thanks to you, I found the problem.


<association name="sAET:cadastre">
   <title>Cadastre</title>
   <target>
      <class>util:contentCGT</class>
      <mandatory>false</mandatory>
      <many>false</many>
   </target>
</association>


In the "class" attribute, I use a custom document type. But my file are "cm:content" type.

Thank you. 🙂