AnsweredAssumed Answered

Create custom datalist in alfresco community 5.2

Question asked by anandhan on Sep 21, 2017
Latest reply on Sep 22, 2017 by anandhan

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="CU:SiteName" />
                    <show id="CU:SiteDescription" />
                </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="CU:SiteName">
                        <control template="/org/alfresco/components/form/controls/textfield.ftl"/>                       
                    </field>
                    <field id="CU:SiteDescription">
                        <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="CU:SiteName" />
                    <show id="CU:SiteDescription" />
                </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="CU:SiteName">
                        <control template="/org/alfresco/components/form/controls/textfield.ftl"/>                       
                    </field>
                    <field id="CU:SiteDescription">
                        <control template="/org/alfresco/components/form/controls/textfield.ftl"/>                       
                    </field>
                </appearance>
            </form>
 
            <form id="datagrid">
                <field-visibility>
                    <show id="CU:id" />
                    <show id="CU:SiteName" />
                    <show id="CU:SiteDescription" />
                </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.

Outcomes