Alfresco Share datalist extensions

A customer of my company ( asked me to develop some extensions for Alfresco Share datalist:

ID generation:

automatic generation of an ID for each item. These IDs are generated using a separate ID sequence on each datalist.

Read-only/view dialog

Double clicking an item display a view-mode form via FormService.


Auto versioning

Aspect cm:versionable with auto-version on property changes is applied to each item. A custom policy triggers versioning if an association was modified  – e.g. dl:assignee.

To display version history a new FormService control was implemented. Via show version link the selected version will be display in another view-mode dialog.

Comments (fm:discussable)

Alfresco only supports a simple comment field, but you often like to have  a discussion thread as you have in doclib. Hence I added support of fm:discussable aspect to datalist items.

Ellipsis for long text

Per default the whole text of a property is displayed in the datagrid. If you’ve longer text – e.g. in cm:description – your datagrid layout will be suboptimal.

So, I added an ellipsis feature for text longer than 40 chars. The whole text will be displayed as tooltip on mouse over.


Upload & Attach

To allow attaching a file to a datalist item that isn’t already stored in the repo an upload&attach action was added to cm:attachment-control.

After you’ve choosen the upload destination directory (reused global-folder.js here) you’ll get the normal upload dialog.

Unable to display content. Adobe Flash is required.


Nick Burch had already developed a basic XLS-export WebScript. I resused that one & added support for fm:discussable comment threads.

XLS-Export button is displayed in the datalist toolbar.

Unable to display content. Adobe Flash is required.


Form-based filters

my last step was to provide form based filters for each datalist. Hence I configured a filter-form for each datalist-type & extended the filter logic of datagrid.js via JS/YUI augment/extend mechanism.

These form based filters support browser history & URL addressability and are collapsable via Alfresco.util.Twister.

Unable to display content. Adobe Flash is required.


I made another screencast that demonstrates most of the features in common:

Unable to display content. Adobe Flash is required.


I guess some of them are useful for every Alfresco Share installations. Thus me, fme and our client are willing to contribute these extensions.

24 thoughts on “Alfresco Share datalist extensions

  1. Hi, you are really amaxing!

    I try to do “Upload & Attach” into data list and I lost one week and nothing! 🙁 How can I do? I try something that I see in foros, Alfresco wiki, but the result is the same: don’t work.

    Actually, in my custom data list I have




    But this isn’t that I need. Thanks in advance.

  2. HI Jan

    Great jop! How can we implement some of the features you described above?

  3. Hi, this look promising.

    How did you manage the ID generation sequence? A customer of mine wants have the same thing. Do you have any pointers or startes on this issue?

  4. Hi,
    ID sequence:
    – add to datalist cm:countable
    – add new or reuse existing ID property to datalistItem.
    – Implement a OnCreateNode Policy for datalistItem that increments counter on dataList & sets ID of datalistItem to current value.


  5. yep. that is exactly what i did before reading your answer. Thanks anyway.

    Now i’m trying to figure out how to have a feature like your ellipsis for shortening long text fields in the datagrid view.

    Is it about tweaking alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\slingshot\datalists\

    Or is there a better way using forms service?

  6. well, I tweaked the YUI cell renderer:

    sth. like:

    if ($html(data.displayValue.length) > 40){
    html += $html(data.displayValue.substring(0,40) + ‘…’);
    var domid = Alfresco.util.generateDomId(elCell);
    new YAHOO.widget.Tooltip(domid +”tooltip”,
    { context:elCell,text: $html(data.displayValue)});
    html += $html(data.displayValue);

  7. Hi,

    Great extensions…
    Is there a place to download and try those extensions?

    Friendly Regards,


  8. Hi Jan,
    Thanks for your extensions…
    I have a question,
    do you use the out-of-the-box data-lists page?
    I am trying to modify the data-lists page, but I have some problems…
    Can you explain how to extend or modify this page??

  9. Pingback: Alfresco Share 4.x feature wishlist @ Alfrescian

  10. Congratulations Jan, really interesting and necessary enhancements for datalists! I don’t know why Alfresco did not work in updating all this features in between 3.3 and 4 version. Thanks again! Alberto

  11. Hi Alberto,
    Alfresco is currently doing a code review of the extensions. Once this is done we’ll continuing discussion with the customer who owns the code regarding an official contribution.
    Cheers, jan

  12. Pingback: Alfresco Share datalist extensions – now Open Source! @ Alfrescian

  13. Hi Jan,

    I want to generate ID sequence for my custom datalist.
    Is it possible?


  14. hi,
    of course! Just add aspect dl:dataListItemId to your custom datalist type.
    cheers, jan

  15. Hi

    This Framework did not working with my custom datalits for Upload&Attach and ExcelExport, but its working good with Filter.
    If you have any solution, Please help.

Leave a Reply

Your email address will not be published. Required fields are marked *