ddraper

Aikau 1.0.85 - Data Lists

Blog Post created by ddraper on Sep 14, 2016

I was asked after I published my last blog post (on the progress being made with the FormsRuntimeService in Aikau) whether or not the example Data Lists page I showed would be available in the next release of Alfresco Share. At the time of writing it is not planned on the road map, however that does not stop you from making use of it.

 

The Aikau JAR contains a number of lib files that can be imported into WebScripts to quickly build standard pages. This previous blog post describes how to provide the Aikau version of the Document Library as a site page.

 

The steps outlined in that post can be loosely followed, but the main difference will be in the JavaScript controller for the WebScript, which should look like this:

<import resource="classpath:/alfresco/site-webscripts/org/alfresco/share/imports/share-header.lib.js">
<import resource="classpath:/alfresco/site-webscripts/org/alfresco/share/imports/share-footer.lib.js">
<import resource="classpath:alfresco/site-webscripts/org/alfresco/aikau/{aikauVersion}/libs/pages/datalists.lib.js">

var siteId = (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "";

var headerServices = getHeaderServices();
var headerWidgets = getHeaderModel(getPageTitle());

var dataListServices = getDataListServices();
var dataListWidgets = getDataListWidgets({
siteId: siteId
});

var services = headerServices.concat(dataListServices);
headerWidgets.push(dataListWidgets);

model.jsonModel = getFooterModel(services, headerWidgets);
model.jsonModel.groupMemberships = user.properties["alfUserGroups"];

However, for convenience I've added a sample extension to a GitHub repository so that you can just download and try it out. Simply download the JAR file and place it into the share/WEB-INF/lib file and restart Share and you'll be able to add this page to existing sites. Don't forget that you'll also need the aikau-forms-runtime-support JAR as well as at least version 1.0.85 of the aikau JAR.

 

It is important to understand that at the time of writing this page is unsupported by Alfresco and is provided purely for educational purposes. The FormsRuntimeService and DataListService are both still under development and are not ready for production use. Having said that, it would be exceptionally valuable to get feedback and bugs reported so that we can continue to improve these until they are ready for production use.

 

This video shows the page in action.

Outcomes