contentreich-alfresco-datalists icon indicating copy to clipboard operation
contentreich-alfresco-datalists copied to clipboard

datalist addon and personal datalist

Open tomastec opened this issue 11 years ago • 7 comments

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?

tomastec avatar Nov 25 '13 07:11 tomastec

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>

tullo avatar Nov 25 '13 08:11 tullo

Hi

I have the same problem.

I create a custom datalist (Employees List) adding the following files:

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.

ismo-conguairta avatar Dec 11 '13 19:12 ismo-conguairta

For the export part have a look at the bean definition of the DataListDownloadWebScript

tullo avatar Dec 11 '13 21:12 tullo

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 avatar Dec 13 '13 06:12 billerby

@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:

What's wrong?

ismo-conguairta avatar Jan 08 '14 13:01 ismo-conguairta

Well at first I would try to remove that if-statement and see what happens.

billerby avatar Jan 11 '14 14:01 billerby

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.

screenshot - 17012014 - 14 06 42

ismo-conguairta avatar Jan 17 '14 13:01 ismo-conguairta