cancel
Showing results for 
Search instead for 
Did you mean: 

Customize packageitems field

arunullas
Champ in-the-making
Champ in-the-making
I have implemented the document approval workflow with escalation procedures and all. Now it requires to block multiple selection of documents, allowing single document at a time. Is it possible to customize the "packageitems" field, so that it can accept only one document at a time? Thank you in advance.
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

The packageitems.ftl always accepts multiple documents since it bases this behavior on a (virtual) data model field that states it accepts multiple objects. You can not change this with configuration unfortunately, but you could write a custom version of packageitems.ftl that generates JavaScript to set the picker option "multipleSelectMode" to false (for reference: the association.ftl which is included by packageitems.ftl generates the code that always sets this to true).

Regards
Axel

arunullas
Champ in-the-making
Champ in-the-making
Thank you for your reply. I tried a configuration like
<config>
  <forms>
     <default-controls>
        <type name="associationSmiley TongueackageItems" template="/org/alfresco/components/form/controls/workflow/packageitems.ftl" >
           <control-param name="rootNode">{siteshome}</control-param>
           <control-param name="endpointMany">false</control-param>
        </type>
     </default-controls>
  </forms>
</config>

and it works for me.
Regards
Arun