cancel
Showing results for 
Search instead for 
Did you mean: 

Overrides

yannicks
Champ in-the-making
Champ in-the-making
Hello,

Can anybody explain me how to use this option?
I try to override the cm:name of a folder in a subtype.
And i don't know which terms to use inside the structure…

I really need help thanks for your help

Here is my example structure


<type name ="my:customFolder">
  <title>my custom folder</title>
  <parent>cm:folder</parent>
  <properties>
    <property name="my:folderName>
      <constraints>
        <constraint ref="my:constraint">
      </constraints>
    </property>
  </properties>
  <overrides>
    <propertyOverrides>
      <property name="cm:name"/>
    </propertyOverrides>
  </overrides>
</type>
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
Hi,

Have you checked the Wiki and associated links?

http://wiki.alfresco.com/wiki/Developer_Guide#Creating_new_Content_Models


Mike

yannicks
Champ in-the-making
Champ in-the-making
Sure, i forget to say that i searched wiki, forums and the webSmiley Tongue

Maybe i missed something but i don't think! I made a search about "propertyOverrides" "overrides" etc.

And nothing about how to use the overrides part…

Thanks,

Yannick

davidc
Star Contributor
Star Contributor
An example:

 <type>
   …
  <overrides>

                <property name="cm:name">
                    <default>fred</default>
                </property>

  </overrides>
   …
</type>

You must override a property that already exists in the parent hierarchy.  You can override the default value, whether it's mandatory (only make it mandatory, not optional), and constraints.

yannicks
Champ in-the-making
Champ in-the-making
I really thank you! It works now…

My fault was that in the schema there is

<propertyOverrides>

</propertyOverrides>

and this is useless!

Thanks for your help!

Yannick