contentreich-alfresco-datalists
contentreich-alfresco-datalists copied to clipboard
datalist addon and personal datalist
HI,
I'm a novice in Alfresco...
I create a personal datalist (using a web tutorial) adding at share-datalist-form-config.xml, datalistModel.xml and data-list-model_es.properties in Alfresco 4.2.e installation my own datalist...
I installed your addon. It runs with the defaults dalists but in my datalist says that: "form definition not found"...
which file I need to edit the addon to work on my own datalist?
Hi
You need to add form def for both creating and editing data list items - in your xxx-share.config.xml you have to define the following for each new data list type:
<config evaluator="model-type" condition="custom:myDataList">...</config>
<config evaluator="node-type" condition="custom:myDataList">...</config>
Hi
I have the same problem.
I create a custom datalist (Employees List) adding the following files:
- tomcat/shared/classes/alfresco/extension/custom-datalist-model.xml
- tomcat/shared/classes/alfresco/extension/custom-datalist-model-context.xml
- tomcat/shared/classes/alfresco/messages/custom-datalist-model.properties
- tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
When I try to export the datalist, I don't have any error message like "form definition not found" but the resulting xls file is empty (no labels, no values). Furthermore, when I try to use filter options no result found.
For the export part have a look at the bean definition of the DataListDownloadWebScript
The reason is that the class @tullo mentions above only exports stuff in the datalist-namespace, so you have to subclass this and add your type to this filtering as well.
The code excluding you types and properties below:
if(DL_NAMESPACE.equals(prop.getNamespaceURI()))
{
props.add(prop);
}
}
@billerby thanks for the tip!
To make things easy, I have created a clone of DataListDownloadWebScript (DNDataListDownloadWebScript) changing only the constant DL_NAMESPACE.
Nothing has changed, the xls file is empty (no labels, no values) and I have no errors in logs.
My custom datalist was made by the following definitions:
- tomcat/shared/classes/alfresco/extension/custom-datalist-model.xml
- tomcat/shared/classes/alfresco/extension/custom-datalist-model-context.xml
- tomcat/shared/classes/alfresco/messages/custom-datalist-model.properties
- tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
What's wrong?
Well at first I would try to remove that if-statement and see what happens.
Done! Now, the xls file is not empty, but there are another fields (Name and Content) that I never defined in the custom-datalist-model.xml. Furthermore the fields are not in order (see the screenshot below).
The same thing doesn't happen for alfresco data lists: no fields undefined and right order.