AnsweredAssumed Answered

Association.ftl with node not selectable

Question asked by theoryoflinkin on Jan 5, 2015
Latest reply on Jan 6, 2015 by theoryoflinkin
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

Attachments

Outcomes