09-21-2017 10:27 AM
Hi,
I am getting error while creating custom Custom Datalist in alfresco community 5.2
Steps followed :
Step 1: Created CustomDataListModel.xml and put it inside the directory "\alfresco-community\tomcat\shared\classes\alfresco\extension\".
Step 2: Created CustomDataListModel-context.xml and put it inside the directory "\alfresco-community\tomcat\shared\classes\alfresco\extension\".
Step 3: Created CustomDataListModel.properties and put it inside the directory "\alfresco-community\tomcat\shared\classes\alfresco\extension\".
Step 4: Added below code in share-config-custom and put it inside the directory "\alfresco-community\tomcat\shared\classes\alfresco\web-extension\".
<config evaluator="node-type" condition="CU:CustomDataListModel">
<forms>
<form>
<field-visibility>
<show id="CU:id" />
<show id="CUiteName" />
<show id="CUiteDescription" />
</field-visibility>
<edit-form template="../data-lists/forms/dataitem.ftl" />
<appearance>
<field id="CU:id">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="CUiteName">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="CUiteDescription">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
</appearance>
</form>
</forms>
</config>
<!-- Task List Datalist Model -->
<config evaluator="model-type" condition="CU:CustomDataListModel">
<forms>
<form>
<field-visibility>
<show id="CU:id" />
<show id="CUiteName" />
<show id="CUiteDescription" />
</field-visibility>
<create-form template="../data-lists/forms/dataitem.ftl" />
<appearance>
<field id="CU:id">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="CUiteName">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="CUiteDescription">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
</appearance>
</form>
<form id="datagrid">
<field-visibility>
<show id="CU:id" />
<show id="CUiteName" />
<show id="CUiteDescription" />
</field-visibility>
</form>
</forms>
</config>
Step 5: Finally restarted the alfresco server. I am getting the error and I am not able to login. I am getting the below error while trying to login.
After revert the code from share-config-custom in step 4. I am able to login.
Here I have attached all the files. Can you please verify it. Please let me know, if I made any mistake.
09-21-2017 12:09 PM
You are copying you properties file to "\alfresco-community\tomcat\shared\classes\alfresco\extension\" while your context file defines:
<property name="labels">
<list>
<value>alfresco.extension.messages.CustomDataListModel</value>
</list>
</property>
move your properties file to "\alfresco-community\tomcat\shared\classes\alfresco\messages\" and fix your context file as follow:
<property name="labels">
<list>
<value>alfresco.messages.CustomDataListModel</value>
</list>
</property>
09-21-2017 12:09 PM
You are copying you properties file to "\alfresco-community\tomcat\shared\classes\alfresco\extension\" while your context file defines:
<property name="labels">
<list>
<value>alfresco.extension.messages.CustomDataListModel</value>
</list>
</property>
move your properties file to "\alfresco-community\tomcat\shared\classes\alfresco\messages\" and fix your context file as follow:
<property name="labels">
<list>
<value>alfresco.messages.CustomDataListModel</value>
</list>
</property>
09-22-2017 01:45 AM
Thanks you very much Alexandre Chapellon. Issue got resolved.
Explore our Alfresco products with the links below. Use labels to filter content by product module.