cancel
Showing results for 
Search instead for 
Did you mean: 

Read only attributes

frankb
Champ in-the-making
Champ in-the-making
Hi,

Lets say I have a aspect:

<aspects>
      <aspect name="dwtype:aspect">
      <title>Status</title>
       <properties>
         <property name="dwtype:someproperty">
            <title>Aspect</title>
            <type>d:text</type>
            <default>Some Value</default>
            <constraints>
               <constraint ref="dwtype:some_constraint"/>
            </constraints>
         </property>
         </properties>
      </aspect>
   </aspects>

Is there any way of makin this attribute a read-only attribute by configuration?
3 REPLIES 3

openpj
Elite Collaborator
Elite Collaborator
You could use the protected element in the property definition. In this way the value is modified only by Alfresco API.

property name="dwtype:someproperty">
            <title>Aspect</title>
            <type>d:text</type>
            <protected>true</protected>
            <default>Some Value</default>
            <constraints>
               <constraint ref="dwtype:some_constraint"/>
            </constraints>
         </property>
Hope this helps.

frankb
Champ in-the-making
Champ in-the-making
Thank you for you'r reply. It works.

isaacrojas
Champ in-the-making
Champ in-the-making
It works for me too. Thanks.