Hi Douglas C. R. Paes.. thank you for your patience
I have created these three files for custom type in tomcat/shared/classes/alfresco/extension/company/model/
which I am attaching here. and the deployed the model using admin-repoconsole. Edited share-config-custom.xml to show the properties in share menus. Restarted alfresco.
If I upload a file through uploader plus and select my custom type. Node broswer for that document shows correct type
But it doesn't allow to change type.
I can not see the attachment.
Here are the attachments
Weird, I still can not see the attachments.
icf-model-context.xml
<?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="company.icfdoc.model.extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionary
Bootstrap">
<property name="models">
<list>
<value>alfresco/extension/company/model/icfdoc-model.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/extension/company/model/icfdoc-model-ResourceBundle</value>
</list>
</property>
</bean>
</beans>
icfdoc-model-ResourceBundle.properties
type.icfdoc= Metadata
icfdoc.type.icfdoc.title=File Type
icfdoc.property.icfdoc_internal_external.title=Internal/External
icfdoc-model.xml
<?xml version="1.0" encoding="UTF-8"?>
<model name="icfdoc:ICFDOCMetaData" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Meta-data about the model -->
<description>Provides the necessary properties to support the content.</description>
<author>xxx</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"/>
</imports>
<!-- Introduction of new namespaces defined by this model -->
<namespaces>
<namespace uri="http://www.company.com/icfdoc/model/1.0" prefix="icfdoc"/>
</namespaces>
<!-- Standalone Constraints -->
<constraints>
<constraint name="icfdoc:internal_external_constraint" type="LIST">
<parameter name="allowedValues">
<list>
<value>Internal</value>
<value>External</value>
</list>
</parameter>
</constraint>
<constraint name="icfdoc:level_constraint" type="LIST">
<parameter name="allowedValues">
<list>
<value>L0</value>
<value>L1</value>
<value>L2</value>
</list>
</parameter>
</constraint>
</constraints>
<!-- T Y P E D E F I N I T I O N S -->
<types>
<type name="icfdoc:metadata">
<title>xxxx</title>
<parent>cm:content</parent>
<properties>
<property name="icfdoc:internal_external">
<title>Internal/External</title>
<description>xxxx</description>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
<constraints>
<constraint ref="icfdoc:internal_external_constraint" />
</constraints>
</property>
<property name="icfdoc:level">
<title>Level</title>
<description>xxxx</description>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
<constraints>
<constraint ref="icfdoc:level_constraint" />
</constraints>
</property>
</properties>
<associations>
<association name="icfdocwner">
<title>Document Owner</title>
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cmerson</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
</associations>
</type>
</types>
</model>
I believe I have just figured out what your problem is.
In your model, and in the screenshot with the document already set as the custom type, the name of the type is icfdoc:metadata, but in the screenshot showing the browser developer tools error, the type has a typo, it is like icfdoc:metdata.
So, in order to fix that, what you have to do is to fix the share-config-custom.xml, in the following section:
<types>
<type name="cm:content">
<subtype name="icfdoc:metdata" />
</type>
</types>
Check that and tell us if that did the trick.
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.