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.
Solved! Go to Solution.
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>
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>
Thanks you very much Alexandre Chapellon. Issue got resolved.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.