Hello,
I implemented a custom model as below
<?xml version="1.0" encoding="UTF-8"?>
<model name="dc:custommodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>DC Custom Model</description>
<author>Techsophy</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 uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<namespaces>
<namespace uri="http://www.DCcustommodel.com/model/content/1.0" prefix="dc" />
</namespaces>
<constraints>
<constraint name="dc:alphanumeric" type="REGEX">
<parameter name="expression">
<value>[a-zA-Z0-9]</value>
</parameter>
<parameter name='requiresMatch'><value>true</value></parameter>
</constraint>
<constraint name="dc:length" type="LENGTH">
<parameter name='minLength'><value>1</value></parameter>
<parameter name='maxLength'><value>10</value></parameter>
</constraint>
</constraints>
<types>
<!-- Enterprise-wide generic document type -->
<type name="dc:membershipDocument">
<title>Transaction Document</title>
<parent>cm:content</parent>
<properties>
<property name="dc:membershipId" >
<type>d:text</type>
<mandatory>true</mandatory>
<constraints>
<constraint ref="dc:alphanumeric" />
<constraint ref="dc:length" />
</constraints>
</property>
</properties>
</type>
<type name="dc:transactionDocument">
<title>Transaction Document</title>
<parent>cm:content</parent>
<properties>
<property name="dc:transactionId" >
<type>d:text</type>
<mandatory>true</mandatory>
<constraints>
<constraint ref="dc:alphanumeric" />
<constraint ref="dc:length" />
</constraints>
</property>
</properties>
</type>
</types>
</model>
and properties files for that model is dcModel.xml contains properties as below
#dc:membership_document
dc_DCcustommodel.type.dc_membershipDocument.title=Membership Document
dc_DCcustommodel.property.dc_membershipId.title=Membership Id
#dc:transaction_document
dc_DCcustommodel.type.dc_transactionDocument.title=Transaction Document
dc_DCcustommodel.property.dc_transactionId.title=Transaction Id
I registered that with bean in service-context.xml
<bean id="dccCustomModel_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/dccModel.xml</value>
</list>
</property>
</bean>
amp generation and further steps are completed successfully.
All the above are done in content-tutorial-platform-jar.
But the problem is still it is showing dc:transactionId in properties section when I changed type of file from share UI .I'm expecting Transaction Id should be shown.
When i configured model and properties in content-tutorial-share-jar,everything is fine and i'm able to see values from properties file.
Any help will be appreciated.
Thanks
Ajay
Solved! Go to Solution.
In your dictionary bootstrap you are actually not bootstrapping your model messages file. There should be another property for the messages in the Spring bean.
In your dictionary bootstrap you are actually not bootstrapping your model messages file. There should be another property for the messages in the Spring bean.
Its working now. Thank you Axel Faust
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.