cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Aspect types not showing in share console!

bilalsaeed
Confirmed Champ
Confirmed Champ
I am writing a webscript for Document Management, there I needed additional metadata of files so I used aspects to achieve such functionality. In Alfresco console custom metadata is appearing but in share console it isn't. Here what I followed the instructions so far.

Placed content-model-context.xml file in "tomcat\shared\classes\alfresco\extension". Content of the file is:

<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <beans>    <!– Registration of new models –>       <bean id="com.compname.alfresco.addon.documentManagement.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">        <property name="models">            <list>                <value>alfresco/extension/model/contentModel.xml</value>            </list>        </property>    </bean>          </beans>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Placed contentModel.xml file in "tomcat\shared\classes\alfresco\extension\model". Content of the file is:

<?xml version="1.0" encoding="UTF-8"?><!– Definition of new Model –><!– The important part here is the name - Note: the use of the my: namespace    which is defined further on in the document –><model name="ud:documentManagementCustomModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">   <!– Optional meta-data about the model –>   <description>Document Management Custom Model</description>   <author>compname</author>   <version>1.0</version>   <!– Imports are required to allow references to definitions in other models –>   <imports>        <!– Import Alfresco Dictionary Definitions –>        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>        <!– Import Alfresco Content Domain Model Definitions –>        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>        <!– Import Alfresco System Model Definitions –>        <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>    </imports>   <!– Introduction of new namespaces defined by this model –>   <!– NOTE: The following namespace my.new.model should be changed to reflect       your own namespace –>   <namespaces>      <namespace uri="http://www.compname.com/model/content/1.0"         prefix="ud" />   </namespaces>   <aspects>      <aspect name="ud:documentManagementCustomFields">         <title>UploadDoc Custom Fields</title>         <properties>            <property name="ud:entityName">               <type>d:text</type>            </property>            <property name="ud:entityID">               <type>d:text</type>            </property>            <property name="ud:caseID">               <type>d:text</type>            </property>                                <property name="ud:sAuthor">               <type>d:text</type>            </property>                                <property name="ud:aBranch">               <type>d:text</type>            </property>                                <property name="ud:cCategory">               <type>d:text</type>            </property>                                <property name="ud:cSubcategory">               <type>d:text</type>            </property>            <property name="ud:documentType">               <type>d:text</type>            </property>            <property name="ud:diaryNumber">               <type>d:text</type>            </property>            <property name="ud:bundleID">               <type>d:text</type>            </property>            <property name="ud:cmNumber">               <type>d:text</type>            </property>            <property name="ud:serviceRequestID">               <type>d:text</type>            </property>            <property name="ud:documentManagementCustomFieldOne">               <type>d:text</type>            </property>            <property name="ud:documentManagementCustomFieldTwo">               <type>d:text</type>            </property>            <property name="ud:documentManagementCustomFieldThree">               <type>d:text</type>            </property>            <property name="ud:documentManagementCustomFieldFour">               <type>d:text</type>            </property>            <property name="ud:documentManagementCustomFieldFive">               <type>d:text</type>            </property>         </properties>      </aspect>   </aspects>    </model>                        ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Then in share-config-custom.xml I placed content:
<aspects>         <!– Aspects that a user can see –>         <visible>            <aspect name="cm:generalclassifiable" />            …..       <aspect name="ud:documentManagementCustomFields" />         </visible><types>         <type name="cm:content">            <subtype name="smf:smartFolderTemplate" />         </type>          <type name="cm:folder">         </type>         <type name="trx:transferTarget">            <subtype name="trx:fileTransferTarget" />         </type>      </types>          <config evaluator="aspect" condition="ud:documentManagementCustomFields">          <forms>             <form>                <field-visibility>                  <show id="ud:entityName" />                  <show id="ud:entityID" />                  <show id="ud:caseID" />                  <show id="ud:sAuthor" />                  <show id="ud:aBranch" />                  <show id="ud:cCategory" />                  <show id="ud:cSubcategory" />                  <show id="ud:documentType" />                  <show id="ud:diaryNumber" />                  <show id="ud:bundleID" />                  <show id="ud:cmNumber" />                </field-visibility>                                <appearance>                                    <field id="ud:entityName" label-id="prop.ud_entityName">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:entityID" label-id="prop.ud_entityID">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                                    <field id="ud:caseID" label-id="prop.ud_caseID">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                                                   <field id="ud:sAuthor" label-id="prop.ud_sAuthor">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                                    <field id="ud:aBranch" label-id="prop.ud_aBranch">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:cCategory" label-id="prop.ud_cCategory">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:cSubcategory" label-id="prop.ud_cSubcategory">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:documentType" label-id="prop.ud_documentType">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:diaryNumber" label-id="prop.ud_diaryNumber">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:bundleID" label-id="prop.ud_bundleID">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                  <field id="ud:cmNumber" label-id="prop.ud_cmNumber">                     <control template="/org/alfresco/components/form/controls/textfield.ftl" />                  </field>                                                                                     </appearance>            </form>          </forms>      </config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Though my custom model is appearing in the list of manage aspects but yet none of the types of my custom aspect appears.
2 REPLIES 2

sujaypillai
Confirmed Champ
Confirmed Champ
Your <aspects> and <types> definition in share-config-custom.xml should be placed under -
<config evaluator="string-compare" condition="DocumentLibrary">      <aspects>         <visible>            <aspect name="ud:documentManagementCustomFields"/>         </visible>      </aspects>                <types>                <types></config> ‍‍‍‍‍‍‍‍‍‍‍

Thanks for replying Sujay. My aspect is already under:

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">      <tree>         <!–            Whether the folder Tree component should enumerate child folders or not.            This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.         –>         <evaluate-child-folders>false</evaluate-child-folders>                  <!–            Optionally limit the number of folders shown in treeview throughout Share.         –>         <maximum-folder-count>1000</maximum-folder-count>                  <!–              Default timeout in milliseconds for folder Tree component to recieve response from Repository         –>         <timeout>7000</timeout>      </tree>      <!–         Used by the "Manage Aspects" action         For custom aspects, remember to also add the relevant i18n string(s)            cm_myaspect=My Aspect      –>      <aspects>         <!– Aspects that a user can see –>         <visible>            <aspect name="cm:generalclassifiable" />            <aspect name="cm:complianceable" />            <aspect name="cm:dublincore" />            <aspect name="cm:effectivity" />            <aspect name="cm:summarizable" />            <aspect name="cm:versionable" />            <aspect name="cm:templatable" />            <aspect name="cm:emailed" />            <aspect name="emailserver:aliasable" />            <aspect name="cm:taggable" />            <aspect name="app:inlineeditable" />            <aspect name="cm:geographic" />            <aspect name="exif:exif" />            <aspect name="audio:audio" />            <aspect name="cm:indexControl" />            <aspect name="dp:restrictable" />            <aspect name="smf:customConfigSmartFolder" />            <aspect name="smf:systemConfigSmartFolder" />         <aspect name="ud:documentManagementCustomFields" />         </visible>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


It appears in the list of available aspects when you tried option manage aspect. Problem is the properties of my aspect not showed up.